diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-03-12 13:58:02 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-06-22 18:20:39 +0200 |
commit | 4caa489d1337c1a72d2e36185e4586ad246b98e1 (patch) | |
tree | f3b207b062c14e7ff647c3c6d9da936310fc04eb /qdev-monitor.c | |
parent | d282842999b914c38c8be4659012aa619c22af8b (diff) | |
download | hqemu-4caa489d1337c1a72d2e36185e4586ad246b98e1.zip hqemu-4caa489d1337c1a72d2e36185e4586ad246b98e1.tar.gz |
qdev-monitor: Propagate errors through set_property()
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r-- | qdev-monitor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c index 12d8f6b..c7b00e0 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -156,8 +156,7 @@ static int set_property(void *opaque, const char *name, const char *value, object_property_parse(obj, value, name, &err); if (err != NULL) { - qerror_report_err(err); - error_free(err); + error_propagate(errp, err); return -1; } return 0; @@ -592,7 +591,8 @@ DeviceState *qdev_device_add(QemuOpts *opts) } /* set properties */ - if (qemu_opt_foreach(opts, set_property, dev, NULL)) { + if (qemu_opt_foreach(opts, set_property, dev, &err)) { + qerror_report_err(err); object_unparent(OBJECT(dev)); object_unref(OBJECT(dev)); return NULL; |