dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/mdadm-3.2.6-In-case-launching-mdmon-fails-print-an-error-message.patch

373056
From 15c10423aa9435ed72bd292fecca69224a20fdc8 Mon Sep 17 00:00:00 2001
373056
From: Jes Sorensen <Jes.Sorensen@redhat.com>
373056
Date: Fri, 1 Feb 2013 16:15:19 +0100
373056
Subject: [PATCH 3/4] In case launching mdmon fails, print an error message
373056
 before exiting
373056
373056
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
373056
Signed-off-by: NeilBrown <neilb@suse.de>
373056
---
373056
 util.c | 5 ++++-
373056
 1 file changed, 4 insertions(+), 1 deletion(-)
373056
373056
diff --git a/util.c b/util.c
373056
index 01af0b5..8817a3e 100644
373056
--- a/util.c
373056
+++ b/util.c
373056
@@ -1709,8 +1709,11 @@ int start_mdmon(int devnum)
373056
 		return -1;
373056
 	default: /* parent - good */
373056
 		pid = wait(&status);
373056
-		if (pid < 0 || status != 0)
373056
+		if (pid < 0 || status != 0) {
373056
+			fprintf(stderr, Name "failed to launch mdmon. "
373056
+			       "Array remains readonly\n");
373056
 			return -1;
373056
+		}
373056
 	}
373056
 	return 0;
373056
 }
373056
-- 
373056
1.7.11.7
373056