]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Dedup IOC enum values in libzfs_input_check
authorRyan Moeller <ryan@freqlabs.com>
Thu, 22 Aug 2019 16:46:09 +0000 (12:46 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 22 Aug 2019 16:46:09 +0000 (09:46 -0700)
Reuse enum value ZFS_IOC_BASE for `('Z' << 8)`.
This is helpful on FreeBSD where ZFS_IOC_BASE has a different value and
`('Z' << 8)` is wrong.

Reviewed-by: Chris Dunlop <chris@onthe.net.au>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes #9188

tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c

index bf57518c7d879d297b1a2751fd312f7602cfc7c0..652c6d9a189569098532cdfb2b1e6105e662c322 100644 (file)
@@ -851,8 +851,8 @@ zfs_ioc_input_tests(const char *pool)
 
 enum zfs_ioc_ref {
        ZFS_IOC_BASE = ('Z' << 8),
-       LINUX_IOC_BASE = ('Z' << 8) + 0x80,
-       FREEBSD_IOC_BASE = ('Z' << 8) + 0xC0,
+       LINUX_IOC_BASE = ZFS_IOC_BASE + 0x80,
+       FREEBSD_IOC_BASE = ZFS_IOC_BASE + 0xC0,
 };
 
 /*