Add a check to make sure the provider name is "mdN" before printing the

unit number.

Suggested by: 	jh
MFC after:	3 days
This commit is contained in:
Rebecca Cran 2011-02-14 09:58:47 +00:00
parent f417369bdd
commit c3e257a9e7

View File

@ -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)