Otherwise, non-string properties without a legacy counterpart are missed. Also fix error propagation in object_property_print itself.
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- hw/qdev-monitor.c | 2 +- qom/object.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 41b9e2c..eed781d 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -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); diff --git a/qom/object.c b/qom/object.c index 464fc8f..b4f6c1d 100644 --- a/qom/object.c +++ b/qom/object.c @@ -839,7 +839,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; -- 1.7.9.3