diff options
author | Neil Brown <neilb@suse.de> | 2007-07-23 17:28:44 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-07-23 17:28:44 +1000 |
commit | 85375d6de14581ca9641ceed15f1c36b65601364 (patch) | |
tree | ac25551e9651a0b16c670587421229f2a03c281b /mdadm.c | |
parent | 9bbcc5f7c4140244abc4d427fe107b9d5c33c257 (diff) | |
download | mdadm-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.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) { |