提交 8185bfc1 编写于 作者: P Paolo Bonzini 提交者: Andreas Färber

qdev: Use object_property_print() in info qtree

Otherwise, non-string properties without a legacy counterpart are missed.
Also fix error propagation in object_property_print() itself.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com>
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 7a059953
......@@ -493,7 +493,7 @@ static void qdev_print_props(Monitor *mon, DeviceState *dev, Property *props,
if (object_property_get_type(OBJECT(dev), legacy_name, NULL)) {
value = object_property_get_str(OBJECT(dev), legacy_name, &err);
} else {
value = object_property_get_str(OBJECT(dev), props->name, &err);
value = object_property_print(OBJECT(dev), props->name, &err);
}
g_free(legacy_name);
......
......@@ -830,7 +830,7 @@ char *object_property_print(Object *obj, const char *name,
char *string;
mo = string_output_visitor_new();
object_property_get(obj, string_output_get_visitor(mo), name, NULL);
object_property_get(obj, string_output_get_visitor(mo), name, errp);
string = string_output_get_string(mo);
string_output_visitor_cleanup(mo);
return string;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册