mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
src/cloner: use btrfs/ioctl.h header if present
Check for the btrfsprogs-devel ioctl.h header at configure time. Use it in src/cloner if present, otherwise fall back to using the copied clone ioctl definitions. Signed-off-by: David Disseldorp <ddiss@suse.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
db5adddbb0
commit
678fd164cb
@@ -30,6 +30,7 @@ AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([ sys/fs/xfs_fsops.h \
|
||||
sys/fs/xfs_itable.h \
|
||||
xfs/platform_defs.h \
|
||||
btrfs/ioctl.h \
|
||||
])
|
||||
|
||||
AC_PACKAGE_NEED_UUIDCOMPARE
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_BTRFS_IOCTL_H
|
||||
#include <btrfs/ioctl.h>
|
||||
#else
|
||||
|
||||
struct btrfs_ioctl_clone_range_args {
|
||||
int64_t src_fd;
|
||||
@@ -42,6 +45,7 @@ struct btrfs_ioctl_clone_range_args {
|
||||
#define BTRFS_IOC_CLONE _IOW(BTRFS_IOCTL_MAGIC, 9, int)
|
||||
#define BTRFS_IOC_CLONE_RANGE _IOW(BTRFS_IOCTL_MAGIC, 13, \
|
||||
struct btrfs_ioctl_clone_range_args)
|
||||
#endif
|
||||
|
||||
static void
|
||||
usage(char *name, const char *msg)
|
||||
|
||||
Reference in New Issue
Block a user