linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Print correct md device name if write_init_super fails
@ 2012-02-21 12:30 Jes.Sorensen
  2012-02-21 19:53 ` NeilBrown
  0 siblings, 1 reply; 3+ messages in thread
From: Jes.Sorensen @ 2012-02-21 12:30 UTC (permalink / raw)
  To: neilb; +Cc: meyering, linux-raid

From: Jes Sorensen <Jes.Sorensen@redhat.com>

This avoids a segfault in case one tries to create a raid from a non
existing device (like a loop device).

Reported by Jim Meyering in
https://bugzilla.redhat.com/show_bug.cgi?id=795461

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 Create.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Create.c b/Create.c
index 90ff3ed..702ac34 100644
--- a/Create.c
+++ b/Create.c
@@ -926,7 +926,7 @@ int Create(struct supertype *st, char *mddev,
 			if (st->ss->write_init_super(st)) {
 				fprintf(stderr,
 					Name ": Failed to write metadata to %s\n",
-					dv->devname);
+					mddev);
 				st->ss->free_super(st);
 				goto abort_locked;
 			}
-- 
1.7.7.6


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

end of thread, other threads:[~2012-02-22 11:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-21 12:30 [PATCH] Print correct md device name if write_init_super fails Jes.Sorensen
2012-02-21 19:53 ` NeilBrown
2012-02-22 11:00   ` Jes Sorensen

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).