svn commit: r211970 - head/cddl/contrib/opensolaris/lib/pyzfs/common

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun Aug 29 20:18:06 UTC 2010


Author: pjd
Date: Sun Aug 29 20:18:06 2010
New Revision: 211970
URL: http://svn.freebsd.org/changeset/base/211970

Log:
  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

Modified:
  head/cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c

Modified: head/cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c	Sun Aug 29 18:50:30 2010	(r211969)
+++ head/cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c	Sun Aug 29 20:18:06 2010	(r211970)
@@ -33,6 +33,7 @@
 #include <zone.h>
 #include <libintl.h>
 #include <libzfs.h>
+#include <libzfs_impl.h>
 #include "zfs_prop.h"
 
 static PyObject *ZFSError;


More information about the svn-src-all mailing list