dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/Don-t-use-exit-ERANGE.patch

2c1b57
From dcd24efcfab50c3c298d9b1c941edb6954c2677e Mon Sep 17 00:00:00 2001
2c1b57
From: NeilBrown <neilb@suse.com>
2c1b57
Date: Fri, 4 Aug 2017 15:30:02 +1000
2c1b57
Subject: [RHEL7.5 PATCH 167/169] Don't use exit(ERANGE)
2c1b57
2c1b57
mdadm uses smaller exit codes like 0,1,2,3,4.
2c1b57
Using ERANGE is inconsistent and not helpful.
2c1b57
So change it to a more consistent number.
2c1b57
2c1b57
Signed-off-by: NeilBrown <neilb@suse.com>
2c1b57
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
2c1b57
---
2c1b57
 mdadm.c | 2 +-
2c1b57
 1 file changed, 1 insertion(+), 1 deletion(-)
2c1b57
2c1b57
diff --git a/mdadm.c b/mdadm.c
2c1b57
index 70b16f2..d80aab3 100644
2c1b57
--- a/mdadm.c
2c1b57
+++ b/mdadm.c
2c1b57
@@ -619,7 +619,7 @@ int main(int argc, char *argv[])
2c1b57
 			c.homecluster = optarg;
2c1b57
 			if (strlen(c.homecluster) > 64) {
2c1b57
 				pr_err("Cluster name too big.\n");
2c1b57
-				exit(ERANGE);
2c1b57
+				exit(2);
2c1b57
 			}
2c1b57
 			continue;
2c1b57
 		case O(CREATE,'x'): /* number of spare (eXtra) disks */
2c1b57
-- 
2c1b57
2.7.4
2c1b57