svn commit: r249114 - stable/8/cddl/contrib/opensolaris/cmd/zpool

Xin LI delphij at FreeBSD.org
Thu Apr 4 23:14:15 UTC 2013


Author: delphij
Date: Thu Apr  4 23:14:14 2013
New Revision: 249114
URL: http://svnweb.freebsd.org/changeset/base/249114

Log:
  Further improve previous revision:
  
   - enable_all_pool_feat will be unset if version is specified.  Use it as
     a flag instead of testing the props nvlist;
   - Allow user to use -d -o feature at ...=enable to create a v5000 pool when
     desired.  Without this, the implicit -o version=28 would make the utility
     to complain about feature@ and version being conflict, which is confusing.
  
  Reviewed by:	Matthew Ahrens

Modified:
  stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c

Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
==============================================================================
--- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c	Thu Apr  4 23:11:56 2013	(r249113)
+++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c	Thu Apr  4 23:14:14 2013	(r249114)
@@ -858,9 +858,7 @@ zpool_do_create(int argc, char **argv)
 
 #ifdef __FreeBSD__
 	/* Compatiblity with FreeBSD 9.0 and 9.1: Use version 28 if unspecified */
-	if (nvlist_lookup_string(props,
-	    zpool_prop_to_name(ZPOOL_PROP_VERSION),
-	    &propval) != 0) {
+	if (enable_all_pool_feat && !prop_list_contains_feature(props)) {
 		if (add_prop_list(zpool_prop_to_name(
 		    ZPOOL_PROP_VERSION), "28", &props, B_TRUE))
 			goto errout;


More information about the svn-src-stable mailing list