diff options
author | NeilBrown <neilb@suse.de> | 2009-07-10 02:44:32 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-07-10 02:44:32 +0200 |
commit | 0ea2b5ef1be03802f34537330884cdaf72494b01 (patch) | |
tree | 283ab61c5e605f48bb6bcca99a7549aa9d51c9fd /Examine.c | |
parent | Examine: fix --examine --brief --verbose on containers. (diff) | |
download | mdadm-0ea2b5ef1be03802f34537330884cdaf72494b01.tar.xz mdadm-0ea2b5ef1be03802f34537330884cdaf72494b01.zip |
Examine: make --metadata= work with --brief
They had different assumptions about the lifetime of 'st'.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Examine.c')
-rw-r--r-- | Examine.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -63,7 +63,7 @@ int Examine(mddev_dev_t devlist, int brief, int export, int scan, } *arrays = NULL; for (; devlist ; devlist=devlist->next) { - struct supertype *st = forcest; + struct supertype *st; fd = dev_open(devlist->devname, O_RDONLY); if (fd < 0) { @@ -75,7 +75,9 @@ int Examine(mddev_dev_t devlist, int brief, int export, int scan, err = 1; } else { - if (!st) + if (forcest) + st = dup_super(forcest); + else st = guess_super(fd); if (st) err = st->ss->load_super(st, fd, |