]> git.ipfire.org Git - thirdparty/libvirt.git/commit
src: Move _virDomainMemoryDef target nodes into an union
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 28 Jul 2023 09:40:37 +0000 (11:40 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Aug 2023 10:39:26 +0000 (12:39 +0200)
commit7d01b673232f2f07b5cfd4cbf86f86a20d790b3a
tree274bfc7ac33fb39196188af1c5ef9826ac9a6d37
parentf23a991beaab07706aac6f5cadc64e56b37063b4
src: Move _virDomainMemoryDef target nodes into an union

The _virDomainMemoryDef struct is getting a bit messy. It has
various members and only some of them are valid for given model.
Worse, some are re-used for different models. We tried to make
this more bearable by putting a comment next to each member
describing what models the member is valid for, but that gets
messy too.

Therefore, do what we do elsewhere: introduce an union of structs
and move individual members into their respective groups.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h
src/conf/domain_postparse.c
src/conf/domain_validate.c
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
src/qemu/qemu_driver.c
src/qemu/qemu_hotplug.c
src/qemu/qemu_process.c
src/qemu/qemu_validate.c