qdev: show failing device name instead of silently exiting
PATCH 1/1 qdev: show failing device name instead of silently exiting
If initializing a device fails, show the name of the device and then exit
--- hw/qdev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
hw/qdev.c +1 -0
@@ -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 ; }
Signature · 1 line
1.6.2.5
Quoted 2 lines · Amit Shah
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.
Quoted 17 lines
Signed-off-by Amit Shah <[email protected]>--- hw/qdev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)hw/qdev.c +1
-0@@ -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 ; }
Hey Markus,
Quoted 6 lines · Markus Armbruster
Quoted 2 lines · Amit Shah
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?)
Quoted 5 lines
Quoted 5 lines
Signed-off-by Amit Shah <[email protected]>--- hw/qdev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 12 lines
hw/qdev.c DeviceState *qdev_device_add(QemuOpts *opts) · line 209
Quoted 12 lines
hw/qdev.c +1
-0@@ -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
Quoted 5 lines · Amit Shah
Hey Markus,
Quoted 2 lines · Markus Armbruster
Amit Shah <[email protected]> writes:
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
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.
Quoted 10 lines · Markus Armbruster
Quoted 8 lines · Amit Shah
Hey Markus,
Quoted 5 lines · Markus Armbruster
Quoted 2 lines · Amit Shah
If initializing a device fails, show the name of the device and then exit
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
"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! :-)
Quoted 2 lines
The message as you worded it made me look for an exit where there wasn't one before.
I'll respin it nevertheless.
Amit
Quoted 18 lines · Amit Shah
Quoted 10 lines · Markus Armbruster
Quoted 8 lines · Amit Shah
Hey Markus,
Quoted 5 lines · Markus Armbruster
Quoted 2 lines · Amit Shah
If initializing a device fails, show the name of the device and then exit
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
"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".
Quoted 8 lines
That's what the subject says! :-)
Quoted 2 lines
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.
Quoted 3 lines · Markus Armbruster
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
Quoted 7 lines · Amit Shah
Quoted 3 lines · Markus Armbruster
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 :)
Quoted 5 lines · Amit Shah
Hey Markus,
Quoted 2 lines · Markus Armbruster
Amit Shah<[email protected]> writes:
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
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