From: NeilBrown <neilb@suse.com>
To: Jes Sorensen <jes.sorensen@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: [PATCH 4/4] Don't use exit(ERANGE)
Date: Fri, 04 Aug 2017 15:30:02 +1000 [thread overview]
Message-ID: <150182460226.25561.10146463474666518480.stgit@noble> (raw)
In-Reply-To: <150182450644.25561.9683614144764209335.stgit@noble>
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>
---
mdadm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mdadm.c b/mdadm.c
index 70b16f2231b7..d80aab361264 100644
--- 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 */
next prev parent reply other threads:[~2017-08-04 5:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 5:30 [PATCH 0/4] Assorted mdadm patches NeilBrown
2017-08-04 5:30 ` [PATCH 3/4] super1: only set clustered flag when bitmap is present NeilBrown
2017-08-04 5:30 ` NeilBrown [this message]
2017-08-04 5:30 ` [PATCH 1/4] Error messages should end with a newline character NeilBrown
2017-08-04 5:30 ` [PATCH 2/4] Use correct syntax for passing DEVLINKS to mdadm from udev NeilBrown
2017-08-16 10:31 ` [PATCH 0/4] Assorted mdadm patches Jes Sorensen
2017-08-16 22:20 ` NeilBrown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=150182460226.25561.10146463474666518480.stgit@noble \
--to=neilb@suse.com \
--cc=jes.sorensen@gmail.com \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox