mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
qdev: implement qdev_prop_set_bit().
implement qdev_prop_set_bit(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
e327e323f1
commit
f4594a3be0
2 changed files with 6 additions and 0 deletions
|
@ -633,6 +633,11 @@ void qdev_prop_set(DeviceState *dev, const char *name, void *src, enum PropertyT
|
|||
qdev_prop_cpy(dev, prop, src);
|
||||
}
|
||||
|
||||
void qdev_prop_set_bit(DeviceState *dev, const char *name, bool value)
|
||||
{
|
||||
qdev_prop_set(dev, name, &value, PROP_TYPE_BIT);
|
||||
}
|
||||
|
||||
void qdev_prop_set_uint8(DeviceState *dev, const char *name, uint8_t value)
|
||||
{
|
||||
qdev_prop_set(dev, name, &value, PROP_TYPE_UINT8);
|
||||
|
|
|
@ -269,6 +269,7 @@ 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(DeviceState *dev, const char *name, void *src, enum PropertyType type);
|
||||
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);
|
||||
void qdev_prop_set_uint16(DeviceState *dev, const char *name, uint16_t value);
|
||||
void qdev_prop_set_uint32(DeviceState *dev, const char *name, uint32_t value);
|
||||
|
|
Loading…
Reference in a new issue