aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qdev-monitor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 9665a5398c..71ebce19df 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -697,22 +697,22 @@ static void qdev_print_props(Monitor *mon, DeviceState *dev, Property *props,
if (!props)
return;
for (; props->name; props++) {
- Error *err = NULL;
char *value;
char *legacy_name = g_strdup_printf("legacy-%s", props->name);
+
if (object_property_get_type(OBJECT(dev), legacy_name, NULL)) {
- value = object_property_get_str(OBJECT(dev), legacy_name, &err);
+ value = object_property_get_str(OBJECT(dev), legacy_name, NULL);
} else {
- value = object_property_print(OBJECT(dev), props->name, true, &err);
+ value = object_property_print(OBJECT(dev), props->name, true,
+ NULL);
}
g_free(legacy_name);
- if (err) {
- error_free(err);
+ if (!value) {
continue;
}
qdev_printf("%s = %s\n", props->name,
- value && *value ? value : "<null>");
+ *value ? value : "<null>");
g_free(value);
}
}