Index: mdconfig.c =================================================================== RCS file: /home/ncvs/src/sbin/mdconfig/mdconfig.c,v retrieving revision 1.49 diff -u -r1.49 mdconfig.c --- mdconfig.c 26 Mar 2006 23:21:11 -0000 1.49 +++ mdconfig.c 27 Mar 2006 00:14:37 -0000 @@ -213,6 +213,13 @@ case 'u': if (cmdline != 2 && cmdline != 3) usage(); + if (!strncmp(optarg, "/dev/", 5)) + optarg += 5; + if (!strncmp(optarg, MD_NAME, sizeof(MD_NAME) - 1)) + optarg += sizeof(MD_NAME) - 1; + mdio.md_unit = strtoul(optarg, &p, 0); + if (mdio.md_unit == (unsigned)ULONG_MAX || *p != '\0') + errx(1, "bad unit: %s", optarg); mdunit = optarg; mdio.md_options &= ~MD_AUTOUNIT; break;