From fb1023d670001c159ccbf82e0dd05b23f1067580 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Wed, 31 Jan 2001 08:41:18 +0000 Subject: [PATCH] Strip optional prefixes "/dev/" and "md" from the -u argument. --- sbin/mdconfig/mdconfig.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c index a5b777c37684..b2ea2bbd31a5 100644 --- a/sbin/mdconfig/mdconfig.c +++ b/sbin/mdconfig/mdconfig.c @@ -126,6 +126,11 @@ main(int argc, char **argv) case 'u': if (cmdline != 2 && cmdline != 3) usage(); + if (!strncmp(optarg, "/dev/", 5)) + optarg += 5; + if (!strncmp(optarg, "md", 2)) + optarg += 2; + mdio.md_unit = strtoul(optarg, NULL, 0); mdio.md_unit = strtoul(optarg, NULL, 0); mdio.md_options &= ~MD_AUTOUNIT; break;