Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Feb 2011 21:21:23 +0000 (UTC)
From:      Bruce Cran <brucec@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: r218752 - stable/8/sbin/mdconfig
Message-ID:  <201102162121.p1GLLNa0084186@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102162121.p1GLLNa0084186>