aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/lib/pyzfs/common
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2010-08-29 20:18:06 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2010-08-29 20:18:06 +0000
commit4f1f4356f3012928b463f9ef1710fb908e48b1e2 (patch)
tree896f5a5d6fe55c73873e1eeae8ae57b16acb19ff /cddl/contrib/opensolaris/lib/pyzfs/common
parent9c7635e18b98078a74f35d3c14f7bd5418920f55 (diff)
downloadsrc-4f1f4356f3012928b463f9ef1710fb908e48b1e2.tar.gz
src-4f1f4356f3012928b463f9ef1710fb908e48b1e2.zip
Fix 'zfs allow' (maybe not only) returning:
cannot access dataset system/usr/home: Operation not supported by including libzfs_impl.h. What libzfs_impl.h does is to redefine ioctl() to be compatible with OpenSolaris. More specifically OpenSolaris returns ENOMEM when buffer is too small and sets field zc_nvlist_dst_size to the size that will be big enough for the data. In FreeBSD case ioctl() doesn't copy data structure back in case of a failure. We work-around it in kernel and libzfs by returning 0 from ioctl() and always checking if zc_nvlist_dst_size hasn't changed. For this work-around to work in pyzfs we need this compatible ioctl() which is implemented in libzfs_impl.h. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=211970
Diffstat (limited to 'cddl/contrib/opensolaris/lib/pyzfs/common')
-rw-r--r--cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c b/cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c
index c0de5c474c0e..4571147a4876 100644
--- a/cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c
+++ b/cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c
@@ -33,6 +33,7 @@
#include <zone.h>
#include <libintl.h>
#include <libzfs.h>
+#include <libzfs_impl.h>
#include "zfs_prop.h"
static PyObject *ZFSError;