summaryrefslogtreecommitdiff
path: root/mdadm.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 /mdadm.c
parent1f48664b8e65cafa65d121bb626649a6310cfaf2 (diff)
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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mdadm.c b/mdadm.c
index 43620b71..069c6d6d 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -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,