diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-10-21 15:25:28 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-27 12:28:38 -0500 |
commit | d8ed79aea7b89b1dc0dbd9ca0b05508e711d2c6d (patch) | |
tree | 8c79d529eef5cbe64cc4bda0db90e60e94fe20c3 /hw/qdev-properties.c | |
parent | 93db66850d99fd9885edeff6af5679be51e1c610 (diff) | |
download | qemu-d8ed79aea7b89b1dc0dbd9ca0b05508e711d2c6d.zip qemu-d8ed79aea7b89b1dc0dbd9ca0b05508e711d2c6d.tar.gz qemu-d8ed79aea7b89b1dc0dbd9ca0b05508e711d2c6d.tar.bz2 |
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>
Diffstat (limited to 'hw/qdev-properties.c')
-rw-r--r-- | hw/qdev-properties.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 2d4eeec..bda6699 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -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; |