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 /mdadm.c | |
parent | 1f48664b8e65cafa65d121bb626649a6310cfaf2 (diff) | |
download | mdadm-5b28bd56725371d4a72988d4e72bb2fd852c6fa7.tar.gz mdadm-5b28bd56725371d4a72988d4e72bb2fd852c6fa7.tar.xz mdadm-5b28bd56725371d4a72988d4e72bb2fd852c6fa7.zip |
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 'mdadm.c')
-rw-r--r-- | mdadm.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1141,6 +1141,11 @@ int main(int argc, char *argv[]) rv = 1; break; } + if (raiddisks == 0) { + fprintf(stderr, Name ": no raid-disks specified.\n"); + rv = 1; + break; + } if (bitmap_file) { if (strcmp(bitmap_file, "internal")==0) { @@ -1160,6 +1165,11 @@ int main(int argc, char *argv[]) rv = 1; break; } + if (raiddisks == 0) { + fprintf(stderr, Name ": no raid-disks specified.\n"); + rv = 1; + break; + } rv = Create(ss, devlist->devname, mdfd, chunk, level, layout, size<0 ? 0 : size, raiddisks, sparedisks, ident.name, homehost, |