summaryrefslogtreecommitdiffstats
path: root/cddl
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2013-04-09 22:27:44 +0000
committermm <mm@FreeBSD.org>2013-04-09 22:27:44 +0000
commit6cbe43292efc65801d4567c37e87a006c8850340 (patch)
treee9111837bcbde6a67f9789b2333ecdb28085ef46 /cddl
parent306fddaf7801d7fae1206025486e9d9a97f52ad4 (diff)
downloadFreeBSD-src-6cbe43292efc65801d4567c37e87a006c8850340.zip
FreeBSD-src-6cbe43292efc65801d4567c37e87a006c8850340.tar.gz
ZFS expects a copyout of zfs_cmd_t on an ioctl error. Our sys_ioctl()
doesn't copyout in this case. To solve this issue a new struct zfs_iocparm_t is introduced consisting of: - zfs_ioctl_version (future backwards compatibility purposes) - user space pointer to zfs_cmd_t (copyin and copyout) - size of zfs_cmd_t (verification purposes) The copyin and copyout of zfs_cmd_t is now done the illumos (vendor) way what makes porting of new changes easier and ensures correct behavior if returning an error. MFC after: 10 days
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c
index 2a2ae76..3c8119d 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c
@@ -72,7 +72,9 @@ zcmd_ioctl(int fd, int request, zfs_cmd_t *zc)
if (zfs_ioctl_version == ZFS_IOCVER_UNDEF)
zfs_ioctl_version = get_zfs_ioctl_version();
- if (zfs_ioctl_version == ZFS_IOCVER_DEADMAN)
+ if (zfs_ioctl_version == ZFS_IOCVER_LZC)
+ cflag = ZFS_CMD_COMPAT_LZC;
+ else if (zfs_ioctl_version == ZFS_IOCVER_DEADMAN)
cflag = ZFS_CMD_COMPAT_DEADMAN;
/*
OpenPOWER on IntegriCloud