]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Don't use exit(ERANGE)
authorNeilBrown <neilb@suse.com>
Fri, 4 Aug 2017 05:30:02 +0000 (15:30 +1000)
committerJes Sorensen <jsorensen@fb.com>
Wed, 16 Aug 2017 12:25:07 +0000 (08:25 -0400)
mdadm uses smaller exit codes like 0,1,2,3,4.
Using ERANGE is inconsistent and not helpful.
So change it to a more consistent number.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
mdadm.c

diff --git a/mdadm.c b/mdadm.c
index 70b16f2231b711a2a230d5996eea902b9d8e127e..d80aab3612641d196d06a96c49e54b91a9cf8681 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -619,7 +619,7 @@ int main(int argc, char *argv[])
                        c.homecluster = optarg;
                        if (strlen(c.homecluster) > 64) {
                                pr_err("Cluster name too big.\n");
-                               exit(ERANGE);
+                               exit(2);
                        }
                        continue;
                case O(CREATE,'x'): /* number of spare (eXtra) disks */