[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 5/9] qdev: implement qdev_prop_set_bit().
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH v5 5/9] qdev: implement qdev_prop_set_bit(). |
Date: |
Wed, 23 Jun 2010 16:15:29 +0900 |
implement qdev_prop_set_bit().
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/qdev-properties.c | 5 +++++
hw/qdev.h | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index 5a8739d..20eec76 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -597,6 +597,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);
diff --git a/hw/qdev.h b/hw/qdev.h
index be5ad67..1de7594 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -266,6 +266,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);
--
1.6.6.1
- [Qemu-devel] [PATCH v5 0/9] pci: multi-function bit fixes, Isaku Yamahata, 2010/06/23
- [Qemu-devel] [PATCH v5 2/9] pci: insert assert that auto-assigned-address function is single function device., Isaku Yamahata, 2010/06/23
- [Qemu-devel] [PATCH v5 7/9] pci: set multifunction property for normal device., Isaku Yamahata, 2010/06/23
- [Qemu-devel] [PATCH v5 3/9] pci: don't overwrite multi functio bit in pci header type., Isaku Yamahata, 2010/06/23
- [Qemu-devel] [PATCH v5 1/9] pci: use PCI_DEVFN() where appropriate., Isaku Yamahata, 2010/06/23
- [Qemu-devel] [PATCH v5 5/9] qdev: implement qdev_prop_set_bit().,
Isaku Yamahata <=
- [Qemu-devel] [PATCH v5 9/9] pci: set PCI multi-function bit appropriately., Isaku Yamahata, 2010/06/23
- [Qemu-devel] [PATCH v5 8/9] pci_bridge: make pci bridge aware of pci multi function bit., Isaku Yamahata, 2010/06/23
- [Qemu-devel] [PATCH v5 4/9] pci: remove PCIDeviceInfo::header_type, Isaku Yamahata, 2010/06/23
- [Qemu-devel] [PATCH v5 6/9] pci: introduce multifunction property., Isaku Yamahata, 2010/06/23