summaryrefslogtreecommitdiffstats
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-11-07 21:39:23 +1100
committerNeilBrown <neilb@suse.de>2008-11-07 21:49:20 +1100
commit7cb2aa33e51bbc2952bb90590fbc47c16a7c27b3 (patch)
tree23dcb09f05c1deb06c1e63734a9fd25a06852d89 /Assemble.c
parentf7ad3ccc7773155eb4e966429f84b529e8339354 (diff)
downloadmdadm-7cb2aa33e51bbc2952bb90590fbc47c16a7c27b3.tar.gz
mdadm-7cb2aa33e51bbc2952bb90590fbc47c16a7c27b3.tar.xz
mdadm-7cb2aa33e51bbc2952bb90590fbc47c16a7c27b3.zip
Assemble: return correct status from assemble_container_content.
Otherwise autoassembly can get confused. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Assemble.c b/Assemble.c
index 98c9c2b..29e3ec7 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1216,7 +1216,7 @@ int assemble_container_content(struct supertype *st, int mdfd,
else if (errno == EEXIST)
preexist++;
if (working == 0)
- /* Nothing new, don't try to start */ ;
+ return 1;/* Nothing new, don't try to start */
else if (runstop > 0 ||
(working + preexist) >= content->array.working_disks) {
@@ -1249,15 +1249,16 @@ int assemble_container_content(struct supertype *st, int mdfd,
fprintf(stderr, "\n");
}
wait_for(chosen_name);
+ return 0;
/* FIXME should have an O_EXCL and wait for read-auto */
- } else
+ } else {
if (verbose >= 0)
fprintf(stderr, Name
": %s assembled with %d devices but "
"not started\n",
chosen_name, working);
-
- return 0;
+ return 1;
+ }
}
#endif