]> git.proxmox.com Git - mirror_zfs.git/commit
Don't hard-code number of ioctls for portability
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 7 Apr 2019 17:18:01 +0000 (02:18 +0900)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sun, 14 Apr 2019 18:13:34 +0000 (11:13 -0700)
commit703f791d3538472600571ecde01627df6b47e6d6
tree7e5510dd0e1e6244ea243945e9d65a44a68be54d
parent96e51d2773cb0f82595f7d29caed0ca4ac653681
Don't hard-code number of ioctls for portability

Use (ZFS_IOC_LAST - ZFS_IOC_FIRST) instead of 256.
It seems 256 is just a number large enough to hold ioctls
at the moment.

Using 256 also causes compile-time warning or error
on platfoms whose enum zfs_ioc definition differs.

Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Closes #8598
tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c