From: Neil Brown Date: Mon, 23 Jul 2007 07:28:44 +0000 (+1000) Subject: Reject '--bitmap none' for build and create. X-Git-Tag: mdadm-2.6.3~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85375d6de14581ca9641ceed15f1c36b65601364;p=thirdparty%2Fmdadm.git 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. --- diff --git a/mdadm.c b/mdadm.c index 45ffaee2..40fdccf7 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) {