qdev: add qdev_prop_exists()

Function test whenever a driver has a specific property.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Gerd Hoffmann 2009-10-21 15:25:28 +02:00 committed by Anthony Liguori
parent 93db66850d
commit d8ed79aea7
2 changed files with 6 additions and 0 deletions

View file

@ -480,6 +480,11 @@ 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;
}
int qdev_prop_parse(DeviceState *dev, const char *name, const char *value)
{
Property *prop;