]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Check for valid save image formats when loading driver config
authorJim Fehlig <jfehlig@suse.com>
Thu, 20 Feb 2025 21:28:35 +0000 (14:28 -0700)
committerJim Fehlig <jfehlig@suse.com>
Mon, 3 Mar 2025 17:05:18 +0000 (10:05 -0700)
commitec50e0cf6389ff176ff6584929a9995c9a47829a
tree79c8681dc632698767c32bb363e31e7739479c89
parent1564607cd01acf251d051989207d4189ba6723c1
qemu: Check for valid save image formats when loading driver config

Checking for valid 'foo_image_format' settings in qemu.conf is not done
until the settings are used. Move the checks to
virQEMUDriverConfigLoadSaveEntry, allowing to report incorrect format
settings at driver startup.

This change was made easier by also changing the corresponding fields
in the virQEMUDriverConfig to 'int', which is more in line with the
other fields that represent enumerated types.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_conf.c
src/qemu/qemu_conf.h
src/qemu/qemu_driver.c
src/qemu/qemu_saveimage.h
src/qemu/qemu_snapshot.c