]> git.proxmox.com Git - mirror_qemu.git/commit - dump/dump.c
dump: Rework dump_calculate_size function
authorJanosch Frank <frankja@linux.ibm.com>
Thu, 11 Aug 2022 12:10:59 +0000 (12:10 +0000)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 6 Oct 2022 15:30:43 +0000 (19:30 +0400)
commitc370d5300f9ac1f90f8158082d22262b904fe30e
tree05902bc16183e6c732e3304a91b4741f5ff26f3e
parentdddf725f70bfe7f5adb41fa31dbd06e767271bda
dump: Rework dump_calculate_size function

dump_calculate_size() sums up all the sizes of the guest memory
blocks. Since we already have a function that calculates the size of a
single memory block (dump_get_memblock_size()) we can simply iterate
over the blocks and use the function instead of calculating the size
ourselves.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Message-Id: <20220811121111.9878-7-frankja@linux.ibm.com>
dump/dump.c