On Fri, Aug 16, 2024 at 04:25:26PM -0600, Jim Fehlig via Devel wrote:
The image format setting in qemu.conf is named
'save_image_format'. The
enum of supported format types is declared with name 'virQEMUSaveFormat'.
Let's be consistent and use 'format' instead of 'compressed' when
referring
to the save image format.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/qemu/qemu_driver.c | 30 +++++++++++++++---------------
src/qemu/qemu_saveimage.c | 32 ++++++++++++++++----------------
src/qemu/qemu_saveimage.h | 4 ++--
src/qemu/qemu_snapshot.c | 6 +++---
4 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 3801ad623a..b114f4b9c2 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2761,16 +2761,16 @@ qemuDomainManagedSaveHelper(virQEMUDriver *driver,
}
cfg = virQEMUDriverGetConfig(driver);
- if ((compressed = qemuSaveImageGetCompressionProgram(cfg->saveImageFormat,
- &compressor,
- "save", false)) <
0)
+ if ((format = qemuSaveImageGetCompressionProgram(cfg->saveImageFormat,
+ &compressor,
+ "save", false)) < 0)
return -1;
path = qemuDomainManagedSavePath(driver, vm);
VIR_INFO("Saving state of domain '%s' to '%s'",
vm->def->name, path);
- if (qemuDomainSaveInternal(driver, vm, path, compressed,
+ if (qemuDomainSaveInternal(driver, vm, path, format,
compressor, dxml, flags) < 0)
return -1;
It'd be nice to also squash this in:
diff --git i/src/qemu/qemu_driver.c w/src/qemu/qemu_driver.c
index aa5fb9a873b0..f27c21ca8cc9 100644
--- i/src/qemu/qemu_driver.c
+++ w/src/qemu/qemu_driver.c
@@ -2605,7 +2605,7 @@ static int
qemuDomainSaveInternal(virQEMUDriver *driver,
virDomainObj *vm,
const char *path,
- int compressed,
+ int format,
virCommand *compressor,
const char *xmlin,
unsigned int flags)
@@ -2683,7 +2683,7 @@ qemuDomainSaveInternal(virQEMUDriver *driver,
if (!(cookie = qemuDomainSaveCookieNew(vm)))
goto endjob;
- if (!(data = virQEMUSaveDataNew(xml, cookie, was_running, compressed,
+ if (!(data = virQEMUSaveDataNew(xml, cookie, was_running, format,
driver->xmlopt)))
goto endjob;
xml = NULL;
--
[...]
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index f5260c4a22..0683bc5939 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -1379,7 +1379,7 @@ qemuSnapshotCreateActiveExternal(virQEMUDriver *driver,
JOB_MASK(VIR_JOB_SUSPEND) |
JOB_MASK(VIR_JOB_MIGRATION_OP)));
- if ((compressed =
qemuSaveImageGetCompressionProgram(cfg->snapshotImageFormat,
+ if ((format = qemuSaveImageGetCompressionProgram(cfg->snapshotImageFormat,
&compressor,
"snapshot",
false)) < 0)
Indentation.
goto cleanup;
With the above changes
Reviewed-by: Martin Kletzander <mkletzan(a)redhat.com>