summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-03-30 14:54:31 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-18 15:14:38 +0200
commit8cb6789a31e8c5823b36d84416433c145a1e6442 (patch)
tree43f266ce5c165ee1c393173fa143e12b19a377d0 /hw
parentac7d1ba6d15ff10343d2ff5ea331fa6a41174f3f (diff)
downloadqemu-8cb6789a31e8c5823b36d84416433c145a1e6442.tar.gz
qemu-8cb6789a31e8c5823b36d84416433c145a1e6442.tar.bz2
qemu-8cb6789a31e8c5823b36d84416433c145a1e6442.zip
qdev: Remove qdev_prop_exists()
Can be replaced everywhere with object_property_find(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw')
-rw-r--r--hw/qdev-properties.c5
-rw-r--r--hw/qdev.c2
-rw-r--r--hw/qdev.h1
-rw-r--r--hw/scsi-bus.c2
4 files changed, 2 insertions, 8 deletions
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index f4b9a0e2c8..099a7aa96f 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -931,11 +931,6 @@ static Property *qdev_prop_find(DeviceState *dev, const char *name)
return NULL;
}
-int qdev_prop_exists(DeviceState *dev, const char *name)
-{
- return qdev_prop_find(dev, name) ? true : false;
-}
-
void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
Property *prop, const char *value)
{
diff --git a/hw/qdev.c b/hw/qdev.c
index 38ca58175f..654cbcaccf 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -323,7 +323,7 @@ void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd)
if (nd->netdev)
qdev_prop_set_netdev(dev, "netdev", nd->netdev);
if (nd->nvectors != DEV_NVECTORS_UNSPECIFIED &&
- qdev_prop_exists(dev, "vectors")) {
+ object_property_find(OBJECT(dev), "vectors")) {
qdev_prop_set_uint32(dev, "vectors", nd->nvectors);
}
nd->instantiated = 1;
diff --git a/hw/qdev.h b/hw/qdev.h
index e39f82e029..ae1d2812bf 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -306,7 +306,6 @@ extern PropertyInfo qdev_prop_blocksize;
/* Set properties between creation and init. */
void *qdev_get_prop_ptr(DeviceState *dev, Property *prop);
-int qdev_prop_exists(DeviceState *dev, const char *name);
int qdev_prop_parse(DeviceState *dev, const char *name, const char *value);
void qdev_prop_set_bit(DeviceState *dev, const char *name, bool value);
void qdev_prop_set_uint8(DeviceState *dev, const char *name, uint8_t value);
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index dbfccdc24a..a4ae44b344 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -214,7 +214,7 @@ SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockDriverState *bdrv,
if (bootindex >= 0) {
qdev_prop_set_int32(dev, "bootindex", bootindex);
}
- if (qdev_prop_exists(dev, "removable")) {
+ if (object_property_find(OBJECT(dev), "removable")) {
qdev_prop_set_bit(dev, "removable", removable);
}
if (qdev_prop_set_drive(dev, "drive", bdrv) < 0) {