]> git.proxmox.com Git - mirror_qemu.git/commit - include/hw/qdev-core.h
qdev: Implement (variable length) array properties
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 15 Mar 2013 16:41:57 +0000 (16:41 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 15 Mar 2013 16:41:57 +0000 (16:41 +0000)
commit0be6bfac6262900425c10847de513ee2490078d3
treee33c7669d808b94fb63276222f8ca5d742c08c73
parent1f56f50ac484653fe996c37ac894418a34f92b89
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>
hw/qdev-core.h
hw/qdev-properties.c
hw/qdev-properties.h