From 0154a1e539370e66bbe54eb62a36f0d684c03331 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Thu, 22 Aug 2019 12:46:09 -0400 Subject: [PATCH] Dedup IOC enum values in libzfs_input_check 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 Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #9188 --- tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c b/tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c index bf57518c7d..652c6d9a18 100644 --- a/tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c +++ b/tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c @@ -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, }; /*