aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/freebsd/zfs/zfs_ioctl_compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/os/freebsd/zfs/zfs_ioctl_compat.c')
-rw-r--r--module/os/freebsd/zfs/zfs_ioctl_compat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/os/freebsd/zfs/zfs_ioctl_compat.c b/module/os/freebsd/zfs/zfs_ioctl_compat.c
index 8dec8644c..81967bed7 100644
--- a/module/os/freebsd/zfs/zfs_ioctl_compat.c
+++ b/module/os/freebsd/zfs/zfs_ioctl_compat.c
@@ -322,8 +322,10 @@ zfs_ioctl_ozfs_to_legacy(int request)
if (request > ZFS_IOC_LAST)
return (-1);
- if (request > ZFS_IOC_PLATFORM)
+ if (request > ZFS_IOC_PLATFORM) {
+ request -= ZFS_IOC_PLATFORM + 1;
return (zfs_ioctl_ozfs_to_legacy_platform_[request]);
+ }
if (request >= sizeof (zfs_ioctl_ozfs_to_legacy_common_)/sizeof (long))
return (-1);
return (zfs_ioctl_ozfs_to_legacy_common_[request]);