* [Qemu-devel] [PATCH] qdev-monitor: Improve error message for -device nonexistant
@ 2013-12-19 14:30 armbru
2013-12-19 15:48 ` Eric Blake
2013-12-20 11:13 ` Andreas Färber
0 siblings, 2 replies; 3+ messages in thread
From: armbru @ 2013-12-19 14:30 UTC (permalink / raw)
To: qemu-devel; +Cc: afaerber, aliguori, lcapitulino
From: Markus Armbruster <armbru@redhat.com>
Once upon a time, the error message was:
qemu: -device nonexistant: "Device "nonexistant" not found. Try -device '?' for a list.
But progress marches on, and conversion to QError (commit 0204276)
changed it into:
Invalid parameter 'driver'
Try with argument '?' for a list.
Progress didn't stop there, of course. After a couple of iterations,
we arrived at the current message (commit 6acbe4c):
qemu: -device nonexistant: Parameter 'driver' expects device type
Mission accomplished: this is complete mush.
We've since abandoned our quest for "rich" error objects, fortunately
before it turned all error messages into mush. Time to undo the
damage to this one. Make it:
qemu: -device nonexistant: nonexistant is not a valid device model name
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
qdev-monitor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/qdev-monitor.c b/qdev-monitor.c
index dc37a43..6251107 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -478,7 +478,8 @@ DeviceState *qdev_device_add(QemuOpts *opts)
}
if (!oc) {
- qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver", "device type");
+ qerror_report(ERROR_CLASS_GENERIC_ERROR,
+ "'%s' is not a valid device model name", driver);
return NULL;
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qdev-monitor: Improve error message for -device nonexistant
2013-12-19 14:30 [Qemu-devel] [PATCH] qdev-monitor: Improve error message for -device nonexistant armbru
@ 2013-12-19 15:48 ` Eric Blake
2013-12-20 11:13 ` Andreas Färber
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2013-12-19 15:48 UTC (permalink / raw)
To: armbru, qemu-devel; +Cc: afaerber, aliguori, lcapitulino
[-- Attachment #1: Type: text/plain, Size: 667 bytes --]
On 12/19/2013 07:30 AM, armbru@redhat.com wrote:
> From: Markus Armbruster <armbru@redhat.com>
>
>
> We've since abandoned our quest for "rich" error objects, fortunately
> before it turned all error messages into mush. Time to undo the
> damage to this one. Make it:
>
> qemu: -device nonexistant: nonexistant is not a valid device model name
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> qdev-monitor.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qdev-monitor: Improve error message for -device nonexistant
2013-12-19 14:30 [Qemu-devel] [PATCH] qdev-monitor: Improve error message for -device nonexistant armbru
2013-12-19 15:48 ` Eric Blake
@ 2013-12-20 11:13 ` Andreas Färber
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Färber @ 2013-12-20 11:13 UTC (permalink / raw)
To: armbru, qemu-devel; +Cc: Anthony Liguori, lcapitulino
Am 19.12.2013 15:30, schrieb armbru@redhat.com:
> From: Markus Armbruster <armbru@redhat.com>
>
> Once upon a time, the error message was:
>
> qemu: -device nonexistant: "Device "nonexistant" not found. Try -device '?' for a list.
>
> But progress marches on, and conversion to QError (commit 0204276)
> changed it into:
>
> Invalid parameter 'driver'
> Try with argument '?' for a list.
>
> Progress didn't stop there, of course. After a couple of iterations,
> we arrived at the current message (commit 6acbe4c):
>
> qemu: -device nonexistant: Parameter 'driver' expects device type
>
> Mission accomplished: this is complete mush.
>
> We've since abandoned our quest for "rich" error objects, fortunately
> before it turned all error messages into mush. Time to undo the
> damage to this one. Make it:
>
> qemu: -device nonexistant: nonexistant is not a valid device model name
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> qdev-monitor.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Thanks, rebased onto your other fix and applied to qom-next:
https://github.com/afaerber/qemu-cpu/commits/qom-next
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-20 11:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-19 14:30 [Qemu-devel] [PATCH] qdev-monitor: Improve error message for -device nonexistant armbru
2013-12-19 15:48 ` Eric Blake
2013-12-20 11:13 ` Andreas Färber
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).