svn commit: r218754 - stable/7/sbin/mdconfig
Bruce Cran
brucec at FreeBSD.org
Wed Feb 16 21:24:09 UTC 2011
Author: brucec
Date: Wed Feb 16 21:24:09 2011
New Revision: 218754
URL: http://svn.freebsd.org/changeset/base/218754
Log:
MFC r218652, r218677:
Only print the unit number when invoked with the -n flag.
PR: bin/144300
Submitted by: arundel
Modified:
stable/7/sbin/mdconfig/mdconfig.c
Directory Properties:
stable/7/sbin/mdconfig/ (props changed)
Modified: stable/7/sbin/mdconfig/mdconfig.c
==============================================================================
--- stable/7/sbin/mdconfig/mdconfig.c Wed Feb 16 21:23:09 2011 (r218753)
+++ stable/7/sbin/mdconfig/mdconfig.c Wed Feb 16 21:24:09 2011 (r218754)
@@ -363,7 +363,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)
More information about the svn-src-stable-7
mailing list