Date: Mon, 14 Feb 2011 09:58:48 +0000 (UTC) From: Bruce Cran <brucec@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r218677 - head/sbin/mdconfig Message-ID: <201102140958.p1E9wmc0086915@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brucec Date: Mon Feb 14 09:58:47 2011 New Revision: 218677 URL: http://svn.freebsd.org/changeset/base/218677 Log: Add a check to make sure the provider name is "mdN" before printing the unit number. Suggested by: jh MFC after: 3 days Modified: head/sbin/mdconfig/mdconfig.c Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Mon Feb 14 08:14:06 2011 (r218676) +++ head/sbin/mdconfig/mdconfig.c Mon Feb 14 09:58:47 2011 (r218677) @@ -373,7 +373,11 @@ md_list(char *units, int opt) found = 1; } gc = &pp->lg_config; - printf("%s", nflag ? pp->lg_name + 2 : 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?201102140958.p1E9wmc0086915>