forked from linux-test-project/ltp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lapi: Split ficlone fallbacks from fs.h
In the end splitting the ficlone fallbacks from fs.h is the easiest solution we can do. Link: https://lore.kernel.org/ltp/[email protected]/ Fixes: 3acc96d ("Add fallback definitions for lapi/fs.h") Reviewed-by: Petr Vorel <[email protected]> Signed-off-by: Cyril Hrubis <[email protected]>
- Loading branch information
Showing
7 changed files
with
40 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
/* | ||
* Copyright (C) 2024 Andrea Cervesato <[email protected]> | ||
* Copyright (C) 2024 Cyril Hrubis <[email protected]> | ||
*/ | ||
|
||
#ifndef LAPI_FICLONE_H__ | ||
#define LAPI_FICLONE_H__ | ||
|
||
#include "config.h" | ||
|
||
#ifdef HAVE_LINUX_FS_H | ||
# include <linux/fs.h> | ||
#endif | ||
|
||
#include <stdint.h> | ||
|
||
#ifndef HAVE_STRUCT_FILE_CLONE_RANGE | ||
struct file_clone_range { | ||
int64_t src_fd; | ||
uint64_t src_offset; | ||
uint64_t src_length; | ||
uint64_t dest_offset; | ||
}; | ||
#endif | ||
|
||
#ifndef FICLONE | ||
# define FICLONE _IOW(0x94, 9, int) | ||
#endif | ||
|
||
#ifndef FICLONERANGE | ||
# define FICLONERANGE _IOW(0x94, 13, struct file_clone_range) | ||
#endif | ||
|
||
#endif /* LAPI_FICLONE_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
*/ | ||
|
||
#include "tst_test.h" | ||
#include "lapi/fs.h" | ||
#include "lapi/ficlone.h" | ||
|
||
#define MNTPOINT "mnt" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters