Fix build failure that would be caused by missing pc_dimm_count() that was introduced in dropped [03/11] pc: check if KVM has enough memory slots for DIMM devices
Signed-off-by: Igor Mammedov <imamm...@redhat.com> --- hw/i386/pc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 1d413a7..e656658 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1550,6 +1550,18 @@ void qemu_register_pc_machine(QEMUMachine *m) g_free(name); } +static int pc_dimm_count(Object *obj, void *opaque) +{ + int *count = opaque; + + if (object_dynamic_cast(obj, TYPE_PC_DIMM)) { + (*count)++; + } + + object_child_foreach(obj, pc_dimm_count, opaque); + return 0; +} + static int pc_existing_dimms_capacity(Object *obj, void *opaque) { Error *local_err = NULL; -- 1.8.3.1