Fix incorrect error status from --examine --scan

Signed-off-by: Neil Brown <neilb@suse.de>
This commit is contained in:
Neil Brown 2006-05-19 03:48:49 +00:00
parent f1ae21c411
commit 751406f361
1 changed files with 3 additions and 2 deletions

View File

@ -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);
if (fd < 0) {
if (!scan)
if (!scan) {
fprintf(stderr,Name ": cannot open %s: %s\n",
devlist->devname, strerror(errno));
err = 1;
err = 1;
}
}
else {
if (!st)