qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qdev: show failing device name instead of silently exiting
@ 2009-09-23 11:14 Amit Shah
  2009-09-23 20:53 ` Markus Armbruster
  0 siblings, 1 reply; 9+ messages in thread
From: Amit Shah @ 2009-09-23 11:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Amit Shah

If initializing a device fails, show the name of the device
and then exit

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;
     }
-- 
1.6.2.5

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

* Re: [Qemu-devel] [PATCH] qdev: show failing device name instead of silently exiting
  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
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Armbruster @ 2009-09-23 20:53 UTC (permalink / raw)
  To: Amit Shah; +Cc: qemu-devel

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.

> 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;
>      }

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

* Re: [Qemu-devel] [PATCH] qdev: show failing device name instead of silently exiting
  2009-09-23 20:53 ` Markus Armbruster
@ 2009-09-24  3:59   ` Amit Shah
  2009-09-24 13:30     ` Markus Armbruster
  2009-09-25  8:48     ` Gerd Hoffmann
  0 siblings, 2 replies; 9+ messages in thread
From: Amit Shah @ 2009-09-24  3:59 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel

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

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

* Re: [Qemu-devel] [PATCH] qdev: show failing device name instead of silently exiting
  2009-09-24  3:59   ` Amit Shah
@ 2009-09-24 13:30     ` Markus Armbruster
  2009-09-24 13:31       ` Amit Shah
  2009-09-25  8:48     ` Gerd Hoffmann
  1 sibling, 1 reply; 9+ messages in thread
From: Markus Armbruster @ 2009-09-24 13:30 UTC (permalink / raw)
  To: Amit Shah; +Cc: qemu-devel

Amit Shah <amit.shah@redhat.com> writes:

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

You could say "show the name of the device before exiting".

The message as you worded it made me look for an exit where there wasn't
one before.

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

* Re: [Qemu-devel] [PATCH] qdev: show failing device name instead of silently exiting
  2009-09-24 13:30     ` Markus Armbruster
@ 2009-09-24 13:31       ` Amit Shah
  2009-09-24 14:22         ` Markus Armbruster
  0 siblings, 1 reply; 9+ messages in thread
From: Amit Shah @ 2009-09-24 13:31 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel

On (Thu) Sep 24 2009 [15:30:27], Markus Armbruster wrote:
> Amit Shah <amit.shah@redhat.com> writes:
> 
> > 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?)
> 
> You could say "show the name of the device before exiting".

That's what the subject says! :-)

> The message as you worded it made me look for an exit where there wasn't
> one before.

I'll respin it nevertheless.

		Amit

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

* Re: [Qemu-devel] [PATCH] qdev: show failing device name instead of silently exiting
  2009-09-24 13:31       ` Amit Shah
@ 2009-09-24 14:22         ` Markus Armbruster
  2009-09-24 15:36           ` Amit Shah
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Armbruster @ 2009-09-24 14:22 UTC (permalink / raw)
  To: Amit Shah; +Cc: qemu-devel

Amit Shah <amit.shah@redhat.com> writes:

> On (Thu) Sep 24 2009 [15:30:27], Markus Armbruster wrote:
>> Amit Shah <amit.shah@redhat.com> writes:
>> 
>> > 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?)
>> 
>> You could say "show the name of the device before exiting".
>
> That's what the subject says! :-)
>
>> The message as you worded it made me look for an exit where there wasn't
>> one before.
>
> I'll respin it nevertheless.
>
> 		Amit

Thanks, and hope you don't mind me being such a stickler for clear
commit messages.

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

* Re: [Qemu-devel] [PATCH] qdev: show failing device name instead of silently exiting
  2009-09-24 14:22         ` Markus Armbruster
@ 2009-09-24 15:36           ` Amit Shah
  2009-09-24 17:50             ` Markus Armbruster
  0 siblings, 1 reply; 9+ messages in thread
From: Amit Shah @ 2009-09-24 15:36 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel

On (Thu) Sep 24 2009 [16:22:34], Markus Armbruster wrote:
> 
> Thanks, and hope you don't mind me being such a stickler for clear
> commit messages.

As long as you widen your net -- the commit logs aren't all too good to
read :-)

		Amit

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

* Re: [Qemu-devel] [PATCH] qdev: show failing device name instead of silently exiting
  2009-09-24 15:36           ` Amit Shah
@ 2009-09-24 17:50             ` Markus Armbruster
  0 siblings, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2009-09-24 17:50 UTC (permalink / raw)
  To: Amit Shah; +Cc: qemu-devel

Amit Shah <amit.shah@redhat.com> writes:

> On (Thu) Sep 24 2009 [16:22:34], Markus Armbruster wrote:
>> 
>> Thanks, and hope you don't mind me being such a stickler for clear
>> commit messages.
>
> As long as you widen your net -- the commit logs aren't all too good to
> read :-)

It's an all too common complaint in my reviews.  It stood out in your
case not because the message was particularly bad, only because I
couldn't find anything else to complain about :)

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

* Re: [Qemu-devel] [PATCH] qdev: show failing device name instead of silently exiting
  2009-09-24  3:59   ` Amit Shah
  2009-09-24 13:30     ` Markus Armbruster
@ 2009-09-25  8:48     ` Gerd Hoffmann
  1 sibling, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2009-09-25  8:48 UTC (permalink / raw)
  To: Amit Shah; +Cc: Markus Armbruster, qemu-devel

On 09/24/09 05:59, Amit Shah wrote:
> 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?)

I have patches in the queue which will wind up this via device_add 
monitor command.  Caller will *not* exit then ;)

cheers,
   Gerd

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

end of thread, other threads:[~2009-09-25  8:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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