提交 4caa489d 编写于 作者: M Markus Armbruster

qdev-monitor: Propagate errors through set_property()

Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NAndreas Färber <afaerber@suse.de>
上级 d2828429
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册