diff options
author | Neil Brown <neilb@suse.de> | 2006-06-02 03:32:45 +0200 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-06-02 03:32:45 +0200 |
commit | e52f8e251ac2f98daec3bbb7c4b6df8266c23efa (patch) | |
tree | 1f85fc474f9cd5484a40b2f644a3ff22ee45ff4c /Examine.c | |
parent | Improve compiling for static binaries. (diff) | |
download | mdadm-e52f8e251ac2f98daec3bbb7c4b6df8266c23efa.tar.xz mdadm-e52f8e251ac2f98daec3bbb7c4b6df8266c23efa.zip |
Fix error code from examine properly..
The last one was wrong :-(
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'Examine.c')
-rw-r--r-- | Examine.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -77,8 +77,9 @@ int Examine(mddev_dev_t devlist, int brief, int scan, if (!scan) { fprintf(stderr,Name ": cannot open %s: %s\n", devlist->devname, strerror(errno)); - err = 1; + rv = 1; } + err = 1; } else { if (!st) @@ -86,16 +87,16 @@ int Examine(mddev_dev_t devlist, int brief, int scan, if (st) err = st->ss->load_super(st, fd, &super, (brief||scan)?NULL:devlist->devname); else { - if (!brief) + if (!brief) { fprintf(stderr, Name ": No md superblock detected on %s.\n", devlist->devname); + rv = 1; + } err = 1; } close(fd); } - if (err) { - rv = 1; + if (err) continue; - } if (SparcAdjust) st->ss->update_super(NULL, super, "sparc2.2", devlist->devname, 0, 0, NULL); |