From 85375d6de14581ca9641ceed15f1c36b65601364 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 23 Jul 2007 17:28:44 +1000 Subject: 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. --- mdadm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) { -- cgit