diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2013-03-15 16:41:57 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2013-03-15 16:41:57 +0000 |
commit | 0be6bfac6262900425c10847de513ee2490078d3 (patch) | |
tree | e33c7669d808b94fb63276222f8ca5d742c08c73 /hw/qdev-core.h | |
parent | 1f56f50ac484653fe996c37ac894418a34f92b89 (diff) |
qdev: Implement (variable length) array properties
Add support for declaring array properties for qdev devices.
These work by defining an initial static property 'len-arrayname'
which the user of the device should set to the desired size
of the array. When this property is set, memory is allocated
for the array elements, and dynamic properties "arrayname[0]",
"arrayname[1]"... are created so the user of the device can
then set the values of the individual array elements.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/qdev-core.h')
-rw-r--r-- | hw/qdev-core.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/qdev-core.h b/hw/qdev-core.h index 2486f36853..547fbc7e0d 100644 --- a/hw/qdev-core.h +++ b/hw/qdev-core.h @@ -175,6 +175,9 @@ struct Property { uint8_t bitnr; uint8_t qtype; int64_t defval; + int arrayoffset; + PropertyInfo *arrayinfo; + int arrayfieldsize; }; struct PropertyInfo { |