aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev-properties.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-02-09 10:12:08 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-02-22 08:31:25 +0100
commit0c96e2856e30d9d3eba68e2c87f6163b6ffdf0db (patch)
tree184870e1cda2d6922b779c0d0694ba5b0b7133a9 /hw/qdev-properties.c
parent97aa6e9b8f9df37add21d86fac1a9ca6ce7df9b7 (diff)
qdev: use built-in QOM string parser
object_property_parse lets us drop the legacy setters when their task is done just as well by the string visitors. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/qdev-properties.c')
-rw-r--r--hw/qdev-properties.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index a4545f7969..e13d80bba3 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -1080,9 +1080,9 @@ int qdev_prop_parse(DeviceState *dev, const char *name, const char *value)
legacy_name = g_strdup_printf("legacy-%s", name);
if (object_property_get_type(OBJECT(dev), legacy_name, NULL)) {
- object_property_set_str(OBJECT(dev), value, legacy_name, &err);
+ object_property_parse(OBJECT(dev), value, legacy_name, &err);
} else {
- object_property_set_str(OBJECT(dev), value, name, &err);
+ object_property_parse(OBJECT(dev), value, name, &err);
}
g_free(legacy_name);