diff options
author | Neil Brown <neilb@suse.de> | 2008-05-20 16:28:48 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-05-20 16:28:48 +1000 |
commit | 1c203a4b5a05789a0de2548294c049481bff2254 (patch) | |
tree | d435235f7fc9983584f1811014ecb4c251c6cf08 /mdadm.c | |
parent | df5a0b92954c22128e6beceb6f5df8e303848d71 (diff) | |
download | mdadm-1c203a4b5a05789a0de2548294c049481bff2254.tar.gz mdadm-1c203a4b5a05789a0de2548294c049481bff2254.tar.xz mdadm-1c203a4b5a05789a0de2548294c049481bff2254.zip |
Fix autoassemble for stack arrays.
If you have stacked arrays, then
mdadm -As --homehost=fred
should work but doesn't. It gets into an infinite loop!
So write some tests, and fix the bugs.
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1100,11 +1100,12 @@ int main(int argc, char *argv[]) int acnt; ident.autof = autof; do { + mddev_dev_t devlist = conf_get_devs(); acnt = 0; do { rv2 = Assemble(ss, NULL, -1, &ident, - NULL, NULL, + devlist, NULL, readonly, runstop, NULL, homehost, verbose-quiet, force); if (rv2==0) { cnt++; @@ -1138,7 +1139,8 @@ int main(int argc, char *argv[]) if (cnt == 0 && rv == 0) { fprintf(stderr, Name ": No arrays found in config file or automatically\n"); rv = 1; - } + } else if (cnt) + rv = 0; } else if (cnt == 0 && rv == 0) { fprintf(stderr, Name ": No arrays found in config file\n"); rv = 1; |