From owner-cvs-src-old@FreeBSD.ORG Sun Aug 29 20:18:25 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F34F610657C1 for ; Sun, 29 Aug 2010 20:18:25 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E1DDB8FC18 for ; Sun, 29 Aug 2010 20:18:25 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o7TKIPJu033741 for ; Sun, 29 Aug 2010 20:18:25 GMT (envelope-from pjd@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o7TKIPXV033740 for cvs-src-old@freebsd.org; Sun, 29 Aug 2010 20:18:25 GMT (envelope-from pjd@repoman.freebsd.org) Message-Id: <201008292018.o7TKIPXV033740@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to pjd@repoman.freebsd.org using -f From: Pawel Jakub Dawidek Date: Sun, 29 Aug 2010 20:18:06 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/cddl/contrib/opensolaris/lib/pyzfs/common ioctl.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Aug 2010 20:18:26 -0000 pjd 2010-08-29 20:18:06 UTC FreeBSD src repository Modified files: cddl/contrib/opensolaris/lib/pyzfs/common ioctl.c Log: SVN rev 211970 on 2010-08-29 20:18:06Z by pjd 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 Revision Changes Path 1.2 +1 -0 src/cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c