add support for documented readonly option...

also print out the option that is unknow so that the user knows what (s)he
did wrong..

MFC after:	3 days
This commit is contained in:
John-Mark Gurney 2004-09-08 20:28:29 +00:00
parent 334be0c9c3
commit d31ba6257b

View File

@ -137,12 +137,16 @@ main(int argc, char **argv)
mdio.md_options |= MD_FORCE;
else if (!strcmp(optarg, "noforce"))
mdio.md_options &= ~MD_FORCE;
else if (!strcmp(optarg, "readonly"))
mdio.md_options |= MD_READONLY;
else if (!strcmp(optarg, "noreadonly"))
mdio.md_options &= ~MD_READONLY;
else if (!strcmp(optarg, "reserve"))
mdio.md_options |= MD_RESERVE;
else if (!strcmp(optarg, "noreserve"))
mdio.md_options &= ~MD_RESERVE;
else
errx(1, "Unknown option.");
errx(1, "Unknown option: %s.", optarg);
break;
case 'S':
if (cmdline != 2)