mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
hw/core: Introduce device_class_set_props_n
Record the size of the array in DeviceClass.props_count_. Iterate with known count in qdev_prop_walk. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-14-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
588611972f
commit
cb9f4b28ee
4 changed files with 55 additions and 18 deletions
|
@ -703,6 +703,7 @@ static void device_class_base_init(ObjectClass *class, void *data)
|
|||
* so do not propagate them to the subclasses.
|
||||
*/
|
||||
klass->props_ = NULL;
|
||||
klass->props_count_ = 0;
|
||||
}
|
||||
|
||||
static void device_unparent(Object *obj)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue