Date: Thu, 4 Apr 2013 23:14:14 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249114 - stable/8/cddl/contrib/opensolaris/cmd/zpool Message-ID: <201304042314.r34NEE6M039603@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@...=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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304042314.r34NEE6M039603>