summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-07-23 17:28:44 +1000
committerNeil Brown <neilb@suse.de>2007-07-23 17:28:44 +1000
commit85375d6de14581ca9641ceed15f1c36b65601364 (patch)
treeac25551e9651a0b16c670587421229f2a03c281b /mdadm.c
parent9bbcc5f7c4140244abc4d427fe107b9d5c33c257 (diff)
downloadmdadm-85375d6de14581ca9641ceed15f1c36b65601364.tar.gz
mdadm-85375d6de14581ca9641ceed15f1c36b65601364.tar.xz
mdadm-85375d6de14581ca9641ceed15f1c36b65601364.zip
Reject '--bitmap none' for build and create.
We don't want to create a file called 'none', and it isn't needed, so just reject it.
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mdadm.c b/mdadm.c
index 45ffaee..40fdccf 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -817,9 +817,15 @@ int main(int argc, char *argv[])
backup_file = optarg;
continue;
- case O(GROW,'b'):
case O(BUILD,'b'):
case O(CREATE,'b'): /* here we create the bitmap */
+ if (strcmp(optarg, "none") == 0) {
+ fprintf(stderr, Name ": '--bitmap none' only"
+ " support for --grow\n");
+ exit(2);
+ }
+ /* FALL THROUGH */
+ case O(GROW,'b'):
if (strcmp(optarg, "internal")== 0 ||
strcmp(optarg, "none")== 0 ||
strchr(optarg, '/') != NULL) {