]> git.ipfire.org Git - thirdparty/libvirt.git/commit
src: Move _virDomainMemoryDef source nodes into an union
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 25 Jul 2023 14:48:21 +0000 (16:48 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Aug 2023 10:39:23 +0000 (12:39 +0200)
commitf23a991beaab07706aac6f5cadc64e56b37063b4
treeadc80a688616861aede0b0c8892e254039108adc
parenta03b6cedfd76846ded29b9f06e6299cb473bd14b
src: Move _virDomainMemoryDef source 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.

This allows us to shorten some names (e.g. nvdimmPath or
sourceNodes) as their purpose is obvious due to their placement.
But to make this commit as small as possible, that'll be
addressed later.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
13 files changed:
src/conf/domain_conf.c
src/conf/domain_conf.h
src/conf/domain_validate.c
src/qemu/qemu_cgroup.c
src/qemu/qemu_command.c
src/qemu/qemu_hotplug.c
src/qemu/qemu_namespace.c
src/qemu/qemu_process.c
src/qemu/qemu_validate.c
src/security/security_apparmor.c
src/security/security_dac.c
src/security/security_selinux.c
src/security/virt-aa-helper.c