summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c11
1 files changed, 9 insertions, 2 deletions
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):