From owner-svn-src-stable@FreeBSD.ORG Thu Apr 4 23:14:15 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 236E8979; Thu, 4 Apr 2013 23:14:15 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 14F36264; Thu, 4 Apr 2013 23:14:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34NEEsZ039604; Thu, 4 Apr 2013 23:14:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34NEE6M039603; Thu, 4 Apr 2013 23:14:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304042314.r34NEE6M039603@svn.freebsd.org> From: Xin LI Date: Thu, 4 Apr 2013 23:14:14 +0000 (UTC) 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 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Apr 2013 23:14:15 -0000 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;