diff --git a/linux/32/ioctls_inc_align16.h b/linux/32/ioctls_inc_align16.h index 2dc2e73c..0bf90180 100644 --- a/linux/32/ioctls_inc_align16.h +++ b/linux/32/ioctls_inc_align16.h @@ -614,7 +614,6 @@ { "linux/btrfs.h", "BTRFS_IOC_FS_INFO", _IOC_READ, 0x941f, 0x400 }, { "linux/btrfs.h", "BTRFS_IOC_GET_DEV_STATS", _IOC_READ|_IOC_WRITE, 0x9434, 0x408 }, { "linux/btrfs.h", "BTRFS_IOC_GET_FEATURES", _IOC_READ, 0x9439, 0x18 }, -{ "linux/btrfs.h", "BTRFS_IOC_GET_FSLABEL", _IOC_READ, 0x9431, 0x100 }, { "linux/btrfs.h", "BTRFS_IOC_GET_SUPPORTED_FEATURES", _IOC_READ, 0x9439, 0x48 }, { "linux/btrfs.h", "BTRFS_IOC_INO_LOOKUP", _IOC_READ|_IOC_WRITE, 0x9412, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_INO_PATHS", _IOC_READ|_IOC_WRITE, 0x9423, 0x38 }, @@ -636,7 +635,6 @@ { "linux/btrfs.h", "BTRFS_IOC_SCRUB_PROGRESS", _IOC_READ|_IOC_WRITE, 0x941d, 0x400 }, { "linux/btrfs.h", "BTRFS_IOC_SEND", _IOC_WRITE, 0x9426, 0x44 }, { "linux/btrfs.h", "BTRFS_IOC_SET_FEATURES", _IOC_WRITE, 0x9439, 0x30 }, -{ "linux/btrfs.h", "BTRFS_IOC_SET_FSLABEL", _IOC_WRITE, 0x9432, 0x100 }, { "linux/btrfs.h", "BTRFS_IOC_SET_RECEIVED_SUBVOL", _IOC_READ|_IOC_WRITE, 0x9425, 0xc0 }, { "linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE", _IOC_WRITE, 0x9401, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE_V2", _IOC_WRITE, 0x9417, 0x1000 }, @@ -985,10 +983,12 @@ { "linux/fs.h", "FS_IOC_FSGETXATTR", _IOC_READ, 0x581f, 0x1c }, { "linux/fs.h", "FS_IOC_FSSETXATTR", _IOC_WRITE, 0x5820, 0x1c }, { "linux/fs.h", "FS_IOC_GETFLAGS", _IOC_READ, 0x6601, 0x04 }, +{ "linux/fs.h", "FS_IOC_GETFSLABEL", _IOC_READ, 0x9431, 0x100 }, { "linux/fs.h", "FS_IOC_GETVERSION", _IOC_READ, 0x7601, 0x04 }, { "linux/fs.h", "FS_IOC_GET_ENCRYPTION_POLICY", _IOC_WRITE, 0x6615, 0x0c }, { "linux/fs.h", "FS_IOC_GET_ENCRYPTION_PWSALT", _IOC_WRITE, 0x6614, 0x10 }, { "linux/fs.h", "FS_IOC_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, +{ "linux/fs.h", "FS_IOC_SETFSLABEL", _IOC_WRITE, 0x9432, 0x100 }, { "linux/fs.h", "FS_IOC_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, { "linux/fs.h", "FS_IOC_SET_ENCRYPTION_POLICY", _IOC_READ, 0x6613, 0x0c }, { "linux/fsl-diu-fb.h", "MFB_GET_ALPHA", _IOC_READ, 0x4d00, 0x01 }, diff --git a/linux/32/ioctls_inc_align32.h b/linux/32/ioctls_inc_align32.h index f9cc3407..fe4356a7 100644 --- a/linux/32/ioctls_inc_align32.h +++ b/linux/32/ioctls_inc_align32.h @@ -614,7 +614,6 @@ { "linux/btrfs.h", "BTRFS_IOC_FS_INFO", _IOC_READ, 0x941f, 0x400 }, { "linux/btrfs.h", "BTRFS_IOC_GET_DEV_STATS", _IOC_READ|_IOC_WRITE, 0x9434, 0x408 }, { "linux/btrfs.h", "BTRFS_IOC_GET_FEATURES", _IOC_READ, 0x9439, 0x18 }, -{ "linux/btrfs.h", "BTRFS_IOC_GET_FSLABEL", _IOC_READ, 0x9431, 0x100 }, { "linux/btrfs.h", "BTRFS_IOC_GET_SUPPORTED_FEATURES", _IOC_READ, 0x9439, 0x48 }, { "linux/btrfs.h", "BTRFS_IOC_INO_LOOKUP", _IOC_READ|_IOC_WRITE, 0x9412, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_INO_PATHS", _IOC_READ|_IOC_WRITE, 0x9423, 0x38 }, @@ -636,7 +635,6 @@ { "linux/btrfs.h", "BTRFS_IOC_SCRUB_PROGRESS", _IOC_READ|_IOC_WRITE, 0x941d, 0x400 }, { "linux/btrfs.h", "BTRFS_IOC_SEND", _IOC_WRITE, 0x9426, 0x44 }, { "linux/btrfs.h", "BTRFS_IOC_SET_FEATURES", _IOC_WRITE, 0x9439, 0x30 }, -{ "linux/btrfs.h", "BTRFS_IOC_SET_FSLABEL", _IOC_WRITE, 0x9432, 0x100 }, { "linux/btrfs.h", "BTRFS_IOC_SET_RECEIVED_SUBVOL", _IOC_READ|_IOC_WRITE, 0x9425, 0xc0 }, { "linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE", _IOC_WRITE, 0x9401, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE_V2", _IOC_WRITE, 0x9417, 0x1000 }, @@ -985,10 +983,12 @@ { "linux/fs.h", "FS_IOC_FSGETXATTR", _IOC_READ, 0x581f, 0x1c }, { "linux/fs.h", "FS_IOC_FSSETXATTR", _IOC_WRITE, 0x5820, 0x1c }, { "linux/fs.h", "FS_IOC_GETFLAGS", _IOC_READ, 0x6601, 0x04 }, +{ "linux/fs.h", "FS_IOC_GETFSLABEL", _IOC_READ, 0x9431, 0x100 }, { "linux/fs.h", "FS_IOC_GETVERSION", _IOC_READ, 0x7601, 0x04 }, { "linux/fs.h", "FS_IOC_GET_ENCRYPTION_POLICY", _IOC_WRITE, 0x6615, 0x0c }, { "linux/fs.h", "FS_IOC_GET_ENCRYPTION_PWSALT", _IOC_WRITE, 0x6614, 0x10 }, { "linux/fs.h", "FS_IOC_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, +{ "linux/fs.h", "FS_IOC_SETFSLABEL", _IOC_WRITE, 0x9432, 0x100 }, { "linux/fs.h", "FS_IOC_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, { "linux/fs.h", "FS_IOC_SET_ENCRYPTION_POLICY", _IOC_READ, 0x6613, 0x0c }, { "linux/fsl-diu-fb.h", "MFB_GET_ALPHA", _IOC_READ, 0x4d00, 0x01 }, diff --git a/linux/32/ioctls_inc_align64.h b/linux/32/ioctls_inc_align64.h index 22a8ab5d..bc269887 100644 --- a/linux/32/ioctls_inc_align64.h +++ b/linux/32/ioctls_inc_align64.h @@ -614,7 +614,6 @@ { "linux/btrfs.h", "BTRFS_IOC_FS_INFO", _IOC_READ, 0x941f, 0x400 }, { "linux/btrfs.h", "BTRFS_IOC_GET_DEV_STATS", _IOC_READ|_IOC_WRITE, 0x9434, 0x408 }, { "linux/btrfs.h", "BTRFS_IOC_GET_FEATURES", _IOC_READ, 0x9439, 0x18 }, -{ "linux/btrfs.h", "BTRFS_IOC_GET_FSLABEL", _IOC_READ, 0x9431, 0x100 }, { "linux/btrfs.h", "BTRFS_IOC_GET_SUPPORTED_FEATURES", _IOC_READ, 0x9439, 0x48 }, { "linux/btrfs.h", "BTRFS_IOC_INO_LOOKUP", _IOC_READ|_IOC_WRITE, 0x9412, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_INO_PATHS", _IOC_READ|_IOC_WRITE, 0x9423, 0x38 }, @@ -636,7 +635,6 @@ { "linux/btrfs.h", "BTRFS_IOC_SCRUB_PROGRESS", _IOC_READ|_IOC_WRITE, 0x941d, 0x400 }, { "linux/btrfs.h", "BTRFS_IOC_SEND", _IOC_WRITE, 0x9426, 0x48 }, { "linux/btrfs.h", "BTRFS_IOC_SET_FEATURES", _IOC_WRITE, 0x9439, 0x30 }, -{ "linux/btrfs.h", "BTRFS_IOC_SET_FSLABEL", _IOC_WRITE, 0x9432, 0x100 }, { "linux/btrfs.h", "BTRFS_IOC_SET_RECEIVED_SUBVOL", _IOC_READ|_IOC_WRITE, 0x9425, 0xc8 }, { "linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE", _IOC_WRITE, 0x9401, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE_V2", _IOC_WRITE, 0x9417, 0x1000 }, @@ -985,10 +983,12 @@ { "linux/fs.h", "FS_IOC_FSGETXATTR", _IOC_READ, 0x581f, 0x1c }, { "linux/fs.h", "FS_IOC_FSSETXATTR", _IOC_WRITE, 0x5820, 0x1c }, { "linux/fs.h", "FS_IOC_GETFLAGS", _IOC_READ, 0x6601, 0x04 }, +{ "linux/fs.h", "FS_IOC_GETFSLABEL", _IOC_READ, 0x9431, 0x100 }, { "linux/fs.h", "FS_IOC_GETVERSION", _IOC_READ, 0x7601, 0x04 }, { "linux/fs.h", "FS_IOC_GET_ENCRYPTION_POLICY", _IOC_WRITE, 0x6615, 0x0c }, { "linux/fs.h", "FS_IOC_GET_ENCRYPTION_PWSALT", _IOC_WRITE, 0x6614, 0x10 }, { "linux/fs.h", "FS_IOC_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, +{ "linux/fs.h", "FS_IOC_SETFSLABEL", _IOC_WRITE, 0x9432, 0x100 }, { "linux/fs.h", "FS_IOC_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, { "linux/fs.h", "FS_IOC_SET_ENCRYPTION_POLICY", _IOC_READ, 0x6613, 0x0c }, { "linux/fsl-diu-fb.h", "MFB_GET_ALPHA", _IOC_READ, 0x4d00, 0x01 }, diff --git a/linux/64/ioctls_inc.h b/linux/64/ioctls_inc.h index e4b4a664..bc09c992 100644 --- a/linux/64/ioctls_inc.h +++ b/linux/64/ioctls_inc.h @@ -614,7 +614,6 @@ { "linux/btrfs.h", "BTRFS_IOC_FS_INFO", _IOC_READ, 0x941f, 0x400 }, { "linux/btrfs.h", "BTRFS_IOC_GET_DEV_STATS", _IOC_READ|_IOC_WRITE, 0x9434, 0x408 }, { "linux/btrfs.h", "BTRFS_IOC_GET_FEATURES", _IOC_READ, 0x9439, 0x18 }, -{ "linux/btrfs.h", "BTRFS_IOC_GET_FSLABEL", _IOC_READ, 0x9431, 0x100 }, { "linux/btrfs.h", "BTRFS_IOC_GET_SUPPORTED_FEATURES", _IOC_READ, 0x9439, 0x48 }, { "linux/btrfs.h", "BTRFS_IOC_INO_LOOKUP", _IOC_READ|_IOC_WRITE, 0x9412, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_INO_PATHS", _IOC_READ|_IOC_WRITE, 0x9423, 0x38 }, @@ -636,7 +635,6 @@ { "linux/btrfs.h", "BTRFS_IOC_SCRUB_PROGRESS", _IOC_READ|_IOC_WRITE, 0x941d, 0x400 }, { "linux/btrfs.h", "BTRFS_IOC_SEND", _IOC_WRITE, 0x9426, 0x48 }, { "linux/btrfs.h", "BTRFS_IOC_SET_FEATURES", _IOC_WRITE, 0x9439, 0x30 }, -{ "linux/btrfs.h", "BTRFS_IOC_SET_FSLABEL", _IOC_WRITE, 0x9432, 0x100 }, { "linux/btrfs.h", "BTRFS_IOC_SET_RECEIVED_SUBVOL", _IOC_READ|_IOC_WRITE, 0x9425, 0xc8 }, { "linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE", _IOC_WRITE, 0x9401, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE_V2", _IOC_WRITE, 0x9417, 0x1000 }, @@ -985,10 +983,12 @@ { "linux/fs.h", "FS_IOC_FSGETXATTR", _IOC_READ, 0x581f, 0x1c }, { "linux/fs.h", "FS_IOC_FSSETXATTR", _IOC_WRITE, 0x5820, 0x1c }, { "linux/fs.h", "FS_IOC_GETFLAGS", _IOC_READ, 0x6601, 0x08 }, +{ "linux/fs.h", "FS_IOC_GETFSLABEL", _IOC_READ, 0x9431, 0x100 }, { "linux/fs.h", "FS_IOC_GETVERSION", _IOC_READ, 0x7601, 0x08 }, { "linux/fs.h", "FS_IOC_GET_ENCRYPTION_POLICY", _IOC_WRITE, 0x6615, 0x0c }, { "linux/fs.h", "FS_IOC_GET_ENCRYPTION_PWSALT", _IOC_WRITE, 0x6614, 0x10 }, { "linux/fs.h", "FS_IOC_SETFLAGS", _IOC_WRITE, 0x6602, 0x08 }, +{ "linux/fs.h", "FS_IOC_SETFSLABEL", _IOC_WRITE, 0x9432, 0x100 }, { "linux/fs.h", "FS_IOC_SETVERSION", _IOC_WRITE, 0x7602, 0x08 }, { "linux/fs.h", "FS_IOC_SET_ENCRYPTION_POLICY", _IOC_READ, 0x6613, 0x0c }, { "linux/fsl-diu-fb.h", "MFB_GET_ALPHA", _IOC_READ, 0x4d00, 0x01 }, diff --git a/linux/x32/ioctls_inc0.h b/linux/x32/ioctls_inc0.h index 1d9c6f38..3db6ef8d 100644 --- a/linux/x32/ioctls_inc0.h +++ b/linux/x32/ioctls_inc0.h @@ -614,7 +614,6 @@ { "linux/btrfs.h", "BTRFS_IOC_FS_INFO", _IOC_READ, 0x941f, 0x400 }, { "linux/btrfs.h", "BTRFS_IOC_GET_DEV_STATS", _IOC_READ|_IOC_WRITE, 0x9434, 0x408 }, { "linux/btrfs.h", "BTRFS_IOC_GET_FEATURES", _IOC_READ, 0x9439, 0x18 }, -{ "linux/btrfs.h", "BTRFS_IOC_GET_FSLABEL", _IOC_READ, 0x9431, 0x100 }, { "linux/btrfs.h", "BTRFS_IOC_GET_SUPPORTED_FEATURES", _IOC_READ, 0x9439, 0x48 }, { "linux/btrfs.h", "BTRFS_IOC_INO_LOOKUP", _IOC_READ|_IOC_WRITE, 0x9412, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_INO_PATHS", _IOC_READ|_IOC_WRITE, 0x9423, 0x38 }, @@ -636,7 +635,6 @@ { "linux/btrfs.h", "BTRFS_IOC_SCRUB_PROGRESS", _IOC_READ|_IOC_WRITE, 0x941d, 0x400 }, { "linux/btrfs.h", "BTRFS_IOC_SEND", _IOC_WRITE, 0x9426, 0x48 }, { "linux/btrfs.h", "BTRFS_IOC_SET_FEATURES", _IOC_WRITE, 0x9439, 0x30 }, -{ "linux/btrfs.h", "BTRFS_IOC_SET_FSLABEL", _IOC_WRITE, 0x9432, 0x100 }, { "linux/btrfs.h", "BTRFS_IOC_SET_RECEIVED_SUBVOL", _IOC_READ|_IOC_WRITE, 0x9425, 0xc8 }, { "linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE", _IOC_WRITE, 0x9401, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE_V2", _IOC_WRITE, 0x9417, 0x1000 }, @@ -985,10 +983,12 @@ { "linux/fs.h", "FS_IOC_FSGETXATTR", _IOC_READ, 0x581f, 0x1c }, { "linux/fs.h", "FS_IOC_FSSETXATTR", _IOC_WRITE, 0x5820, 0x1c }, { "linux/fs.h", "FS_IOC_GETFLAGS", _IOC_READ, 0x6601, 0x04 }, +{ "linux/fs.h", "FS_IOC_GETFSLABEL", _IOC_READ, 0x9431, 0x100 }, { "linux/fs.h", "FS_IOC_GETVERSION", _IOC_READ, 0x7601, 0x04 }, { "linux/fs.h", "FS_IOC_GET_ENCRYPTION_POLICY", _IOC_WRITE, 0x6615, 0x0c }, { "linux/fs.h", "FS_IOC_GET_ENCRYPTION_PWSALT", _IOC_WRITE, 0x6614, 0x10 }, { "linux/fs.h", "FS_IOC_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, +{ "linux/fs.h", "FS_IOC_SETFSLABEL", _IOC_WRITE, 0x9432, 0x100 }, { "linux/fs.h", "FS_IOC_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, { "linux/fs.h", "FS_IOC_SET_ENCRYPTION_POLICY", _IOC_READ, 0x6613, 0x0c }, { "linux/fsl-diu-fb.h", "MFB_GET_ALPHA", _IOC_READ, 0x4d00, 0x01 }, diff --git a/maint/ioctls_sym.sh b/maint/ioctls_sym.sh index 81ee631d..b63ef716 100755 --- a/maint/ioctls_sym.sh +++ b/maint/ioctls_sym.sh @@ -393,6 +393,10 @@ s/^\([[:space:]]\+[^),]\+)\),$/\1/' >> "$tmpdir/$f" # Soft post-preprocess workarounds. Fragile. case "$f" in + *linux/btrfs.h) + sed -i '/[[:space:]]BTRFS_IOC_[GS]ET_FSLABEL[[:space:]]/d' \ + "$tmpdir"/header.out + ;; *linux/kvm.h) arm_list='KVM_ARM_[A-Z_]+' ppc_list='KVM_ALLOCATE_RMA|KVM_CREATE_SPAPR_TCE|KVM_CREATE_SPAPR_TCE_64|KVM_PPC_[A-Z1-9_]+' diff --git a/tests/btrfs.c b/tests/btrfs.c index b44bc872..f23d7c0a 100644 --- a/tests/btrfs.c +++ b/tests/btrfs.c @@ -54,6 +54,14 @@ # define BTRFS_NAME_LEN 255 #endif +#ifndef FS_IOC_GETFSLABEL +# define FS_IOC_GETFSLABEL BTRFS_IOC_GET_FSLABEL +#endif + +#ifndef FS_IOC_SETFSLABEL +# define FS_IOC_SETFSLABEL BTRFS_IOC_SET_FSLABEL +#endif + /* * Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in * its definition, which isn't exported by the kernel. @@ -1650,32 +1658,32 @@ btrfs_test_quota_rescan_ioctl(void) /* * Consumes argument, returns nothing: - * - BTRFS_IOC_SET_FSLABEL + * - FS_IOC_SETFSLABEL * * Consumes no argument, returns argument: - * - BTRFS_IOC_GET_FS_LABEL + * - FS_IOC_GETFSLABEL */ static void btrfs_test_label_ioctls(void) { char label[BTRFS_LABEL_SIZE] = "btrfs-label"; - ioctl(-1, BTRFS_IOC_SET_FSLABEL, NULL); + ioctl(-1, FS_IOC_SETFSLABEL, NULL); printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", - ioc(BTRFS_IOC_SET_FSLABEL)); + ioc(FS_IOC_SETFSLABEL)); - ioctl(-1, BTRFS_IOC_SET_FSLABEL, label); + ioctl(-1, FS_IOC_SETFSLABEL, label); printf("ioctl(-1, %s, \"%s\") = -1 EBADF (%m)\n", - ioc(BTRFS_IOC_SET_FSLABEL), label); + ioc(FS_IOC_SETFSLABEL), label); if (write_ok) { - ioctl(btrfs_test_dir_fd, BTRFS_IOC_SET_FSLABEL, label); + ioctl(btrfs_test_dir_fd, FS_IOC_SETFSLABEL, label); printf("ioctl(%d, %s, \"%s\") = 0\n", - btrfs_test_dir_fd, ioc(BTRFS_IOC_SET_FSLABEL), label); + btrfs_test_dir_fd, ioc(FS_IOC_SETFSLABEL), label); - ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_FSLABEL, label); + ioctl(btrfs_test_dir_fd, FS_IOC_GETFSLABEL, label); printf("ioctl(%d, %s, \"%s\") = 0\n", - btrfs_test_dir_fd, ioc(BTRFS_IOC_GET_FSLABEL), label); + btrfs_test_dir_fd, ioc(FS_IOC_GETFSLABEL), label); } } @@ -2025,7 +2033,7 @@ btrfs_test_read_ioctls(void) XLAT(BTRFS_IOC_BALANCE_PROGRESS), XLAT(BTRFS_IOC_FS_INFO), XLAT(BTRFS_IOC_GET_FEATURES), - XLAT(BTRFS_IOC_GET_FSLABEL), + XLAT(FS_IOC_GETFSLABEL), XLAT(BTRFS_IOC_GET_SUPPORTED_FEATURES), XLAT(BTRFS_IOC_QGROUP_LIMIT), XLAT(BTRFS_IOC_QUOTA_RESCAN_STATUS),