Skip to content

Commit

Permalink
Dedup IOC enum values in libzfs_input_check
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ryan Moeller authored and tonyhutter committed Jan 22, 2020
1 parent f64ef73 commit 0189eb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,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,
};

/*
Expand Down

0 comments on commit 0189eb4

Please sign in to comment.