qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qdev: show failing device name instead of silently exiting
Date: Thu, 24 Sep 2009 09:29:08 +0530	[thread overview]
Message-ID: <20090924035908.GA4584@amit-x200.redhat.com> (raw)
In-Reply-To: <8763b97588.fsf@pike.pond.sub.org>

Hey Markus,

On (Wed) Sep 23 2009 [22:53:27], Markus Armbruster wrote:
> Amit Shah <amit.shah@redhat.com> writes:
> 
> > If initializing a device fails, show the name of the device
> > and then exit
> 
> "and then exit" is misleading, as you don't add an exit.

The 'return NULL' does that -- the calling function exits.
(doesn't the subject line clarify that?)

> > Signed-off-by: Amit Shah <amit.shah@redhat.com>
> > ---
> >  hw/qdev.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/hw/qdev.c b/hw/qdev.c
> > index 1d79db0..62a6fc7 100644
> > --- a/hw/qdev.c
> > +++ b/hw/qdev.c
> > @@ -203,6 +203,7 @@ DeviceState *qdev_device_add(QemuOpts *opts)
> >          return NULL;
> >      }
> >      if (qdev_init(qdev) != 0) {
> > +        qemu_error("Error initializing device %s\n", driver);
> >          qdev_free(qdev);
> >          return NULL;
> >      }

		Amit

  reply	other threads:[~2009-09-24  3:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23 11:14 [Qemu-devel] [PATCH] qdev: show failing device name instead of silently exiting Amit Shah
2009-09-23 20:53 ` Markus Armbruster
2009-09-24  3:59   ` Amit Shah [this message]
2009-09-24 13:30     ` Markus Armbruster
2009-09-24 13:31       ` Amit Shah
2009-09-24 14:22         ` Markus Armbruster
2009-09-24 15:36           ` Amit Shah
2009-09-24 17:50             ` Markus Armbruster
2009-09-25  8:48     ` Gerd Hoffmann

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=20090924035908.GA4584@amit-x200.redhat.com \
    --to=amit.shah@redhat.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).