Make sure mdadm -S returns correct error code

If a bad file names was given, exit status still 0.
If some devices couldn't be stopped for "mdadm -Ss"
exit status still 0.

Thanks: Daniel Hottinger <hotti@google.com>

Signed-off-by: Neil Brown <neilb@suse.de>
This commit is contained in:
Neil Brown 2005-10-21 06:13:04 +00:00
parent dcec9ee547
commit 7f48e21079
1 changed files with 3 additions and 1 deletions

View File

@ -1059,6 +1059,7 @@ int main(int argc, char *argv[])
put_md_name(name);
}
} while (!last && err);
if (err) rv |= 1
} else {
fprintf(stderr, Name ": No devices given.\n");
exit(2);
@ -1088,7 +1089,8 @@ int main(int argc, char *argv[])
rv |= Manage_ro(dv->devname, mdfd, -1); break;
}
close(mdfd);
}
} else
rv |= 1;
}
}
break;