summaryrefslogtreecommitdiffstats
path: root/sbin/mdconfig
diff options
context:
space:
mode:
authorjmg <jmg@FreeBSD.org>2004-09-08 20:28:29 +0000
committerjmg <jmg@FreeBSD.org>2004-09-08 20:28:29 +0000
commitdb223378ac33191f9433f25ce7798ee62fc8a9af (patch)
tree078dfd6f2ffb973814c973b0f6c912d36d0b3fe0 /sbin/mdconfig
parent19d2139e029736d71e139fbed994252623895bff (diff)
downloadFreeBSD-src-db223378ac33191f9433f25ce7798ee62fc8a9af.zip
FreeBSD-src-db223378ac33191f9433f25ce7798ee62fc8a9af.tar.gz
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
Diffstat (limited to 'sbin/mdconfig')
-rw-r--r--sbin/mdconfig/mdconfig.c6
1 files changed, 5 insertions, 1 deletions
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)
OpenPOWER on IntegriCloud