summaryrefslogtreecommitdiff
path: root/Build.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-05-21 14:25:47 +1000
committerNeil Brown <neilb@suse.de>2007-05-21 14:25:47 +1000
commit5b28bd56725371d4a72988d4e72bb2fd852c6fa7 (patch)
tree9920caeae7cd911d759d4f71e8bc8600be0a10e4 /Build.c
parent1f48664b8e65cafa65d121bb626649a6310cfaf2 (diff)
downloadmdadm-5b28bd56725371d4a72988d4e72bb2fd852c6fa7.tar.gz
Improve error message for adding bitmap to a level that cannot support it.
Also give error on --build if no devices given.
Diffstat (limited to 'Build.c')
-rw-r--r--Build.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Build.c b/Build.c
index df9f4f2..1de3596 100644
--- a/Build.c
+++ b/Build.c
@@ -146,6 +146,12 @@ int Build(char *mddev, int mdfd, int chunk, int level, int layout,
fprintf(stderr, Name ": bitmaps not supported with this kernel\n");
return 1;
}
+
+ if (bitmap_file && level <= 0) {
+ fprintf(stderr, Name ": bitmaps not meaningful with level %s\n",
+ map_num(pers, level)?:"given");
+ return 1;
+ }
/* now add the devices */
for ((i=0), (dv = devlist) ; dv ; i++, dv=dv->next) {
unsigned long long dsize;