diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-02-08 11:01:56 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-02-14 21:12:05 +0100 |
commit | 85ca1202d1227b3a816c714db6c8e19b613172c5 (patch) | |
tree | 79c6bf1afda808e87452ca347a2f798922e23636 | |
parent | 104059da546c5cae03767c519013704d0baa0896 (diff) | |
download | hqemu-85ca1202d1227b3a816c714db6c8e19b613172c5.zip hqemu-85ca1202d1227b3a816c714db6c8e19b613172c5.tar.gz |
qdev: Use QAPI type names for properties
Use "drive", "chr", etc. only for legacy_name (which shows up
in -device foo,? output).
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>
-rw-r--r-- | hw/core/qdev-properties-system.c | 12 | ||||
-rw-r--r-- | hw/core/qdev-properties.c | 18 |
2 files changed, 19 insertions, 11 deletions
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 3f29b49..5f5957e 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -109,7 +109,8 @@ static void set_drive(Object *obj, Visitor *v, void *opaque, } PropertyInfo qdev_prop_drive = { - .name = "drive", + .name = "str", + .legacy_name = "drive", .get = get_drive, .set = set_drive, .release = release_drive, @@ -164,7 +165,8 @@ static void set_chr(Object *obj, Visitor *v, void *opaque, } PropertyInfo qdev_prop_chr = { - .name = "chr", + .name = "str", + .legacy_name = "chr", .get = get_chr, .set = set_chr, .release = release_chr, @@ -242,7 +244,8 @@ static void set_netdev(Object *obj, Visitor *v, void *opaque, } PropertyInfo qdev_prop_netdev = { - .name = "netdev", + .name = "str", + .legacy_name = "netdev", .get = get_netdev, .set = set_netdev, }; @@ -321,7 +324,8 @@ static void set_vlan(Object *obj, Visitor *v, void *opaque, } PropertyInfo qdev_prop_vlan = { - .name = "vlan", + .name = "int32", + .legacy_name = "vlan", .print = print_vlan, .get = get_vlan, .set = set_vlan, diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 0a2ca05..77d0c66 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -107,7 +107,7 @@ static void prop_set_bit(Object *obj, Visitor *v, void *opaque, } PropertyInfo qdev_prop_bit = { - .name = "boolean", + .name = "bool", .legacy_name = "on/off", .get = prop_get_bit, .set = prop_set_bit, @@ -141,7 +141,7 @@ static void set_bool(Object *obj, Visitor *v, void *opaque, } PropertyInfo qdev_prop_bool = { - .name = "boolean", + .name = "bool", .get = get_bool, .set = set_bool, }; @@ -358,7 +358,7 @@ static void set_string(Object *obj, Visitor *v, void *opaque, } PropertyInfo qdev_prop_string = { - .name = "string", + .name = "str", .release = release_string, .get = get_string, .set = set_string, @@ -442,7 +442,8 @@ inval: } PropertyInfo qdev_prop_macaddr = { - .name = "macaddr", + .name = "str", + .legacy_name = "macaddr", .get = get_mac, .set = set_mac, }; @@ -463,7 +464,8 @@ PropertyInfo qdev_prop_losttickpolicy = { QEMU_BUILD_BUG_ON(sizeof(BiosAtaTranslation) != sizeof(int)); PropertyInfo qdev_prop_bios_chs_trans = { - .name = "bios-chs-trans", + .name = "BiosAtaTranslation", + .legacy_name = "bios-chs-trans", .enum_table = BiosAtaTranslation_lookup, .get = get_enum, .set = set_enum, @@ -582,7 +584,8 @@ static void set_blocksize(Object *obj, Visitor *v, void *opaque, } PropertyInfo qdev_prop_blocksize = { - .name = "blocksize", + .name = "uint16", + .legacy_name = "blocksize", .get = get_uint16, .set = set_blocksize, }; @@ -689,7 +692,8 @@ inval: } PropertyInfo qdev_prop_pci_host_devaddr = { - .name = "pci-host-devaddr", + .name = "str", + .legacy_name = "pci-host-devaddr", .get = get_pci_host_devaddr, .set = set_pci_host_devaddr, }; |