aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-09-10 11:43:25 +0200
committermalc <av1474@comtv.ru>2009-09-10 19:47:58 +0400
commit316940b06273c43ec8d58fcb0908267f7fa5d333 (patch)
tree4c75627fd5d6828e09fb8c986dd74f6f7bf8b5b4 /hw/qdev.h
parent679a37afc49373834f2dc639b179f78112219089 (diff)
qdev: add property type for 32bit signed integers.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/qdev.h')
-rw-r--r--hw/qdev.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/qdev.h b/hw/qdev.h
index 6d0d7f4f21..c2609b4fe9 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -62,6 +62,7 @@ enum PropertyType {
PROP_TYPE_UNSPEC = 0,
PROP_TYPE_UINT16,
PROP_TYPE_UINT32,
+ PROP_TYPE_INT32,
PROP_TYPE_UINT64,
PROP_TYPE_TADDR,
PROP_TYPE_MACADDR,
@@ -156,6 +157,7 @@ void do_info_qdm(Monitor *mon);
extern PropertyInfo qdev_prop_uint16;
extern PropertyInfo qdev_prop_uint32;
+extern PropertyInfo qdev_prop_int32;
extern PropertyInfo qdev_prop_uint64;
extern PropertyInfo qdev_prop_hex32;
extern PropertyInfo qdev_prop_hex64;
@@ -183,6 +185,8 @@ extern PropertyInfo qdev_prop_pci_devfn;
DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_uint16, uint16_t)
#define DEFINE_PROP_UINT32(_n, _s, _f, _d) \
DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_uint32, uint32_t)
+#define DEFINE_PROP_INT32(_n, _s, _f, _d) \
+ DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_int32, int32_t)
#define DEFINE_PROP_UINT64(_n, _s, _f, _d) \
DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_uint64, uint64_t)
#define DEFINE_PROP_HEX32(_n, _s, _f, _d) \
@@ -210,6 +214,7 @@ 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_uint16(DeviceState *dev, const char *name, uint16_t value);
void qdev_prop_set_uint32(DeviceState *dev, const char *name, uint32_t value);
+void qdev_prop_set_int32(DeviceState *dev, const char *name, int32_t value);
void qdev_prop_set_uint64(DeviceState *dev, const char *name, uint64_t value);
void qdev_prop_set_chr(DeviceState *dev, const char *name, CharDriverState *value);
void qdev_prop_set_drive(DeviceState *dev, const char *name, DriveInfo *value);