diff options
author | Neil Brown <neilb@suse.de> | 2005-10-21 06:13:04 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2005-10-21 06:13:04 +0000 |
commit | 7f48e210799be9765d5bafc4f51bfedc6139a1df (patch) | |
tree | a8d0e1b640e3235748a603adb087b2f3bf314a27 | |
parent | dcec9ee54779586f287f5db98ab1be3f0f02dd3f (diff) | |
download | mdadm-7f48e210799be9765d5bafc4f51bfedc6139a1df.tar.gz mdadm-7f48e210799be9765d5bafc4f51bfedc6139a1df.tar.xz mdadm-7f48e210799be9765d5bafc4f51bfedc6139a1df.zip |
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>
-rw-r--r-- | mdadm.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |