linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jes.Sorensen@redhat.com
To: neilb@suse.de
Cc: meyering@redhat.com, linux-raid@vger.kernel.org
Subject: [PATCH] Print correct md device name if write_init_super fails
Date: Tue, 21 Feb 2012 13:30:02 +0100	[thread overview]
Message-ID: <1329827402-12124-1-git-send-email-Jes.Sorensen@redhat.com> (raw)

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


             reply	other threads:[~2012-02-21 12:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-21 12:30 Jes.Sorensen [this message]
2012-02-21 19:53 ` [PATCH] Print correct md device name if write_init_super fails NeilBrown
2012-02-22 11:00   ` Jes Sorensen

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=1329827402-12124-1-git-send-email-Jes.Sorensen@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=meyering@redhat.com \
    --cc=neilb@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).