Date: Mon, 5 Apr 2010 18:27:58 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r206199 - head/cddl/contrib/opensolaris/lib/libzfs/common Message-ID: <201004051827.o35IRwVD008632@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Mon Apr 5 18:27:58 2010 New Revision: 206199 URL: http://svn.freebsd.org/changeset/base/206199 Log: Refine previous partial merge of OpenSolaris onnv revision 9396:f41cf682d0d3. This fixes a regression that zfs list would crash on zfs having user properties. PR: kern/145377 Submitted by: mm Approved by: pjd Obtained from: OpenSolaris MFC after: 10 days Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Apr 5 18:25:30 2010 (r206198) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Apr 5 18:27:58 2010 (r206199) @@ -4288,7 +4288,12 @@ zfs_prune_proplist(zfs_handle_t *zhp, ui zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); - if (props[zfs_prop] == B_FALSE) + /* + * We leave user:props in the nvlist, so there will be + * some ZPROP_INVAL. To be extra safe, don't prune + * those. + */ + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) (void) nvlist_remove(zhp->zfs_props, nvpair_name(curr), nvpair_type(curr)); curr = next;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004051827.o35IRwVD008632>