summaryrefslogtreecommitdiff
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-02-25 15:04:16 +1100
committerNeilBrown <neilb@suse.de>2014-02-25 15:04:16 +1100
commit56bbc588f7f0f3bdd3ec23f02109b427c1d3b8f1 (patch)
tree754f3c0b2f356c2421dec075d201bf34c76b12a8 /Assemble.c
parent9ee314dab91dc8479d2e981d0849ce777f7ea492 (diff)
Assemble: change load_devices to return most_recent 'st' value.
This means that st->ss->getinfo_super(st, content, NULL); clean = content->array.state & 1; will get an up-to-date value for 'clean'. This fix allows tests/03r5assem-failed to work. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Assemble.c b/Assemble.c
index 658df91d..05ace561 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -703,8 +703,12 @@ static int load_devices(struct devs *devices, char *devmap,
if (devices[devcnt].i.disk.state == 6) {
if (most_recent < 0 ||
devices[devcnt].i.events
- > devices[most_recent].i.events)
+ > devices[most_recent].i.events) {
+ struct supertype *tmp = tst;
+ tst = st;
+ st = tmp;
most_recent = devcnt;
+ }
}
tst->ss->free_super(tst);
free(tst);