Fix incorrect error status from --examine --scan
Signed-off-by: Neil Brown <neilb@suse.de>
This commit is contained in:
parent
f1ae21c411
commit
751406f361
|
@ -72,10 +72,11 @@ int Examine(mddev_dev_t devlist, int brief, int scan, int SparcAdjust, struct su
|
||||||
|
|
||||||
fd = dev_open(devlist->devname, O_RDONLY);
|
fd = dev_open(devlist->devname, O_RDONLY);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
if (!scan)
|
if (!scan) {
|
||||||
fprintf(stderr,Name ": cannot open %s: %s\n",
|
fprintf(stderr,Name ": cannot open %s: %s\n",
|
||||||
devlist->devname, strerror(errno));
|
devlist->devname, strerror(errno));
|
||||||
err = 1;
|
err = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!st)
|
if (!st)
|
||||||
|
|
Loading…
Reference in New Issue