diff options
author | Ryan Moeller <[email protected]> | 2020-08-01 11:44:54 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-01 08:44:54 -0700 |
commit | b6737193ee601cc213d3630e4603f9883b6002ad (patch) | |
tree | bb46c43abb7bd2a3c4841664ee3e0b5a3cbc8587 /lib | |
parent | fe628bc21d360336307d1da09bc9260a46dde444 (diff) |
FreeBSD: Fix `zfs jail` and add a test
zfs_jail was not using zfs_ioctl so failed to map the IOC number
correctly. Use zfs_ioctl to perform the jail ioctl and add a test
case for FreeBSD.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #10658
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/os/freebsd/libzfs_compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/os/freebsd/libzfs_compat.c b/lib/libzfs/os/freebsd/libzfs_compat.c index 98269b57b..a4643ef08 100644 --- a/lib/libzfs/os/freebsd/libzfs_compat.c +++ b/lib/libzfs/os/freebsd/libzfs_compat.c @@ -268,7 +268,7 @@ zfs_jail(zfs_handle_t *zhp, int jailid, int attach) zc.zc_zoneid = jailid; cmd = attach ? ZFS_IOC_JAIL : ZFS_IOC_UNJAIL; - if ((ret = ioctl(hdl->libzfs_fd, cmd, &zc)) != 0) + if ((ret = zfs_ioctl(hdl, cmd, &zc)) != 0) zfs_standard_error(hdl, errno, errbuf); return (ret); |