similarly to qemuMigrationParamsSetULL, we need to be able to
set fields from qemu_saveimage.
Signed-off-by: Claudio Fontana <cfontana(a)suse.de>
---
src/qemu/qemu_migration_params.c | 22 ++++++++++++++++++++++
src/qemu/qemu_migration_params.h | 9 +++++++++
2 files changed, 31 insertions(+)
diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index df2384b213..36174a66d8 100644
--- a/src/qemu/qemu_migration_params.c
+++ b/src/qemu/qemu_migration_params.c
@@ -1109,6 +1109,28 @@ qemuMigrationParamsFetch(virQEMUDriver *driver,
}
+void
+qemuMigrationParamsSetCap(qemuMigrationParams *migParams,
+ virQEMUCapsFlags flag)
+{
+ ignore_value(virBitmapSetBit(migParams->caps, flag));
+}
+
+
+int
+qemuMigrationParamsSetInt(qemuMigrationParams *migParams,
+ qemuMigrationParam param,
+ int value)
+{
+ if (qemuMigrationParamsCheckType(param, QEMU_MIGRATION_PARAM_TYPE_INT) < 0)
+ return -1;
+
+ migParams->params[param].value.i = value;
+ migParams->params[param].set = true;
+ return 0;
+}
+
+
int
qemuMigrationParamsSetULL(qemuMigrationParams *migParams,
qemuMigrationParam param,
diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_params.h
index 4a8815e776..99af73b4a4 100644
--- a/src/qemu/qemu_migration_params.h
+++ b/src/qemu/qemu_migration_params.h
@@ -123,6 +123,15 @@ qemuMigrationParamsFetch(virQEMUDriver *driver,
int asyncJob,
qemuMigrationParams **migParams);
+void
+qemuMigrationParamsSetCap(qemuMigrationParams *migParams,
+ virQEMUCapsFlags flag);
+
+int
+qemuMigrationParamsSetInt(qemuMigrationParams *migParams,
+ qemuMigrationParam param,
+ int value);
+
int
qemuMigrationParamsSetULL(qemuMigrationParams *migParams,
qemuMigrationParam param,
--
2.35.3