diff options
author | Neil Brown <neilb@suse.de> | 2007-05-21 14:25:47 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-05-21 14:25:47 +1000 |
commit | 5b28bd56725371d4a72988d4e72bb2fd852c6fa7 (patch) | |
tree | 9920caeae7cd911d759d4f71e8bc8600be0a10e4 /Build.c | |
parent | 1f48664b8e65cafa65d121bb626649a6310cfaf2 (diff) | |
download | mdadm-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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |