btrfs-progs: copy ioctl.h into libbtrfs

We're going to sync btrfs.h into btrfs-progs from the kernel, however
libbtrfs still needs ioctl.h.  To deal with this copy ioctl.h into
libbtrfs, and update that code to use the local copy and update the
libbtrfs headers list to use this copy.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Josef Bacik 2022-11-23 17:37:19 -05:00 committed by David Sterba
parent 2b9fba7974
commit 5fc1d0cd64
4 changed files with 1076 additions and 3 deletions

View file

@ -220,7 +220,7 @@ libbtrfs_objects = \
libbtrfs_headers = libbtrfs/send-stream.h libbtrfs/send-utils.h libbtrfs/send.h kernel-lib/rbtree.h \
kernel-lib/list.h kernel-lib/rbtree_types.h kerncompat.h \
ioctl.h libbtrfs/ctree.h version.h
libbtrfs/ioctl.h libbtrfs/ctree.h version.h
libbtrfsutil_major := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_MAJOR ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)
libbtrfsutil_minor := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_MINOR ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)
libbtrfsutil_patch := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_PATCH ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)

View file

@ -25,7 +25,7 @@
#include "kernel-lib/list.h"
#include "kernel-lib/rbtree.h"
#include "kerncompat.h"
#include "ioctl.h"
#include "libbtrfs/ioctl.h"
#else
#include <btrfs/list.h>
#include <btrfs/rbtree.h>

1073
libbtrfs/ioctl.h Normal file

File diff suppressed because it is too large Load diff

View file

@ -27,7 +27,7 @@
#include "kernel-lib/rbtree.h"
#include "libbtrfs/ctree.h"
#include "libbtrfs/send-utils.h"
#include "ioctl.h"
#include "libbtrfs/ioctl.h"
static int btrfs_subvolid_resolve_sub(int fd, char *path, size_t *path_len,
u64 subvol_id);