Strip optional prefixes "/dev/" and "md" from the -u argument.
This commit is contained in:
parent
27b57c7e04
commit
fb1023d670
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71865
@ -126,6 +126,11 @@ main(int argc, char **argv)
|
|||||||
case 'u':
|
case 'u':
|
||||||
if (cmdline != 2 && cmdline != 3)
|
if (cmdline != 2 && cmdline != 3)
|
||||||
usage();
|
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_unit = strtoul(optarg, NULL, 0);
|
||||||
mdio.md_options &= ~MD_AUTOUNIT;
|
mdio.md_options &= ~MD_AUTOUNIT;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user