From owner-svn-src-stable-8@FreeBSD.ORG Wed Feb 16 21:21:23 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A24FC1065672; Wed, 16 Feb 2011 21:21:23 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 907898FC08; Wed, 16 Feb 2011 21:21:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1GLLNvR084188; Wed, 16 Feb 2011 21:21:23 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1GLLNa0084186; Wed, 16 Feb 2011 21:21:23 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201102162121.p1GLLNa0084186@svn.freebsd.org> From: Bruce Cran Date: Wed, 16 Feb 2011 21:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218752 - stable/8/sbin/mdconfig X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 21:21:23 -0000 Author: brucec Date: Wed Feb 16 21:21:23 2011 New Revision: 218752 URL: http://svn.freebsd.org/changeset/base/218752 Log: MFC r218652, r218677: Only print the unit number when invoked with the -n flag. PR: bin/144300 Submitted by: arundel Modified: stable/8/sbin/mdconfig/mdconfig.c Directory Properties: stable/8/sbin/mdconfig/ (props changed) Modified: stable/8/sbin/mdconfig/mdconfig.c ============================================================================== --- stable/8/sbin/mdconfig/mdconfig.c Wed Feb 16 21:13:02 2011 (r218751) +++ stable/8/sbin/mdconfig/mdconfig.c Wed Feb 16 21:21:23 2011 (r218752) @@ -373,7 +373,11 @@ md_list(char *units, int opt) found = 1; } gc = &pp->lg_config; - printf("%s", pp->lg_name); + if (nflag && strncmp(pp->lg_name, "md", 2) == 0) + printf("%s", pp->lg_name + 2); + else + printf("%s", pp->lg_name); + if (opt & OPT_VERBOSE || opt & OPT_UNIT) { type = geom_config_get(gc, "type"); if (strcmp(type, "vnode") == 0)