aboutsummaryrefslogtreecommitdiff
path: root/qdev-monitor.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-05-01 16:10:24 +0200
committerAndreas Färber <afaerber@suse.de>2013-05-06 19:40:44 +0200
commitb1fe9bcbceb6fb9d800f735da37aa79ac4552c6e (patch)
tree228b470d02bea1a254336d5a7fd1f82e3dd93457 /qdev-monitor.c
parent7e5292b553c9ec27e0816abdcb717f87aa6b6a8d (diff)
downloadqemu-b1fe9bcbceb6fb9d800f735da37aa79ac4552c6e.zip
qemu-b1fe9bcbceb6fb9d800f735da37aa79ac4552c6e.tar.gz
qemu-b1fe9bcbceb6fb9d800f735da37aa79ac4552c6e.tar.bz2
qdev: Let qdev_prop_parse() pass through Error
Move error reporting to callers. Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r--qdev-monitor.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 2cb5600..e54dbc2 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -105,13 +105,17 @@ static void qdev_print_devinfo(ObjectClass *klass, void *opaque)
static int set_property(const char *name, const char *value, void *opaque)
{
DeviceState *dev = opaque;
+ Error *err = NULL;
if (strcmp(name, "driver") == 0)
return 0;
if (strcmp(name, "bus") == 0)
return 0;
- if (qdev_prop_parse(dev, name, value) == -1) {
+ qdev_prop_parse(dev, name, value, &err);
+ if (err != NULL) {
+ qerror_report_err(err);
+ error_free(err);
return -1;
}
return 0;