linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] util: fix seg-fault when trying to kill-subarray in a non-existing container
@ 2011-09-05 14:17 Labun, Marcin
  2011-09-06 21:46 ` Dan Williams
  0 siblings, 1 reply; 3+ messages in thread
From: Labun, Marcin @ 2011-09-05 14:17 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-raid@vger.kernel.org

open_subarray returns valid fd to a container. In case of error shall return
negative value.

Signed-off-by: Marcin Labun <marcin.labun@intel.com>
---
 util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/util.c b/util.c
index ce03239..1680d6b 100644
--- a/util.c
+++ b/util.c
@@ -1370,7 +1370,7 @@ int open_subarray(char *dev, char *subarray, struct supertype *st, int quiet)
 		if (!quiet)
 			fprintf(stderr, Name ": Couldn't open %s, aborting\n",
 				dev);
-		return 2;
+		return -2;
 	}
 
 	st->devnum = fd2devnum(fd);
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-07  4:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-05 14:17 [PATCH] util: fix seg-fault when trying to kill-subarray in a non-existing container Labun, Marcin
2011-09-06 21:46 ` Dan Williams
2011-09-07  4:11   ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).