[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/25] qdev: use object_property_print in info qtree
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 07/25] qdev: use object_property_print in info qtree |
Date: |
Tue, 3 Apr 2012 13:15:35 +0200 |
Otherwise, non-string properties without a legacy counterpart are missed.
Also fix error propagation in object_property_print itself, otherwise
pointer properties are printed as "<null>".
Signed-off-by: Paolo Bonzini <address@hidden>
---
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 0acfc82..07ac525 100644
--- a/hw/qdev-monitor.c
+++ b/hw/qdev-monitor.c
@@ -492,7 +492,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 f3ffaa6..ff36946 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -850,7 +850,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
- Re: [Qemu-devel] [PATCH 01/25] qom: add object_class_get_parent, (continued)
- [Qemu-devel] [PATCH 02/25] qom: add object_child_foreach, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 03/25] qom: add class_base_init, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 05/25] qom: push type up to Object, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 06/25] qdev: fix -device foo,?, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 07/25] qdev: use object_property_print in info qtree,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 08/25] qdev: remove qdev_prop_set_defaults, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 09/25] qdev: move bus properties to a separate global, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 10/25] qdev: do not propagate properties to subclasses, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 11/25] qdev: pick global properties from superclasses, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 12/25] qdev: factor setting of global properties, Paolo Bonzini, 2012/04/03