From owner-svn-src-head@FreeBSD.ORG Sun Aug 29 20:18:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C30F91065674; Sun, 29 Aug 2010 20:18:06 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2AD68FC08; Sun, 29 Aug 2010 20:18:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7TKI6Xo073428; Sun, 29 Aug 2010 20:18:06 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7TKI6u6073426; Sun, 29 Aug 2010 20:18:06 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201008292018.o7TKI6u6073426@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 29 Aug 2010 20:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211970 - head/cddl/contrib/opensolaris/lib/pyzfs/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Aug 2010 20:18:06 -0000 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 #include #include +#include #include "zfs_prop.h" static PyObject *ZFSError;