From 1e0d770c0f2e78bb334cd75d3d71c8c7d3b8f621 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 6 Feb 2006 04:18:12 +0000 Subject: Release some compile fixes. Signed-off-by: Neil Brown --- mdadm.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'mdadm.c') diff --git a/mdadm.c b/mdadm.c index 7b6c3d0..1c9388c 100644 --- a/mdadm.c +++ b/mdadm.c @@ -772,8 +772,15 @@ int main(int argc, char *argv[]) case O(GROW,'b'): case O(BUILD,'b'): case O(CREATE,'b'): /* here we create the bitmap */ - bitmap_file = optarg; - continue; + if (strcmp(optarg, "internal")== 0 || + strcmp(optarg, "none")== 0 || + strchr(optarg, '/') != NULL) { + bitmap_file = optarg; + continue; + } + /* probable typo */ + fprintf(stderr, Name ": bitmap file must contain a '/', or be 'internal', or 'none'\n"); + exit(2); case O(GROW,4): case O(BUILD,4): -- cgit