From db223378ac33191f9433f25ce7798ee62fc8a9af Mon Sep 17 00:00:00 2001 From: jmg Date: Wed, 8 Sep 2004 20:28:29 +0000 Subject: 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 --- sbin/mdconfig/mdconfig.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c index 0fb47bc..db3a733 100644 --- a/sbin/mdconfig/mdconfig.c +++ b/sbin/mdconfig/mdconfig.c @@ -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) -- cgit v1.1