diff options
author | Paolo Bonzini | 2014-02-08 11:01:48 +0100 |
---|---|---|
committer | Andreas Färber | 2014-02-14 21:12:02 +0100 |
commit | 7ce7ffe02750c73e4dce9fd61d25d0fd0b793a2e (patch) | |
tree | 48c2a0fcc194ae1dda3726df3e28473eebe3ae49 /hw/core | |
parent | qdev: Legacy properties are now read-only (diff) | |
download | qemu-7ce7ffe02750c73e4dce9fd61d25d0fd0b793a2e.tar.gz qemu-7ce7ffe02750c73e4dce9fd61d25d0fd0b793a2e.tar.xz qemu-7ce7ffe02750c73e4dce9fd61d25d0fd0b793a2e.zip |
qdev: Legacy properties are just strings
prop->info->legacy_name is still used by "-device foo,?".
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/core')
-rw-r--r-- | hw/core/qdev.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 7c1b7325ca..482a9780d1 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -590,7 +590,7 @@ static void qdev_get_legacy_property(Object *obj, Visitor *v, void *opaque, void qdev_property_add_legacy(DeviceState *dev, Property *prop, Error **errp) { - gchar *name, *type; + gchar *name; /* Register pointer properties as legacy properties */ if (!prop->info->print && prop->info->get) { @@ -598,16 +598,12 @@ void qdev_property_add_legacy(DeviceState *dev, Property *prop, } name = g_strdup_printf("legacy-%s", prop->name); - type = g_strdup_printf("legacy<%s>", - prop->info->legacy_name ?: prop->info->name); - - object_property_add(OBJECT(dev), name, type, + object_property_add(OBJECT(dev), name, "str", prop->info->print ? qdev_get_legacy_property : prop->info->get, NULL, NULL, prop, errp); - g_free(type); g_free(name); } |