The API will soon be called from qemuMigrationParamsFromFlags. Let's
move it to avoid the need to add a forward declaration.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_migration_params.c | 59 ++++++++++++++++----------------
1 file changed, 30 insertions(+), 29 deletions(-)
diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index 262825972c..b532299a5f 100644
--- a/src/qemu/qemu_migration_params.c
+++ b/src/qemu/qemu_migration_params.c
@@ -123,6 +123,36 @@ qemuMigrationParamsFree(qemuMigrationParamsPtr migParams)
migParams->params.VAR ## _set = true; \
} while (0)
+
+int
+qemuMigrationParamsSetCompression(virDomainObjPtr vm ATTRIBUTE_UNUSED,
+ qemuMigrationCompressionPtr compression,
+ qemuMigrationParamsPtr migParams)
+{
+ if (compression->methods & (1ULL << QEMU_MIGRATION_COMPRESS_XBZRLE))
+ ignore_value(virBitmapSetBit(migParams->caps,
+ QEMU_MONITOR_MIGRATION_CAPS_XBZRLE));
+
+ if (compression->methods & (1ULL << QEMU_MIGRATION_COMPRESS_MT))
+ ignore_value(virBitmapSetBit(migParams->caps,
+ QEMU_MONITOR_MIGRATION_CAPS_COMPRESS));
+
+ migParams->params.compressLevel_set = compression->level_set;
+ migParams->params.compressLevel = compression->level;
+
+ migParams->params.compressThreads_set = compression->threads_set;
+ migParams->params.compressThreads = compression->threads;
+
+ migParams->params.decompressThreads_set = compression->dthreads_set;
+ migParams->params.decompressThreads = compression->dthreads;
+
+ migParams->params.xbzrleCacheSize_set = compression->xbzrle_cache_set;
+ migParams->params.xbzrleCacheSize = compression->xbzrle_cache;
+
+ return 0;
+}
+
+
qemuMigrationParamsPtr
qemuMigrationParamsFromFlags(virTypedParameterPtr params,
int nparams,
@@ -342,35 +372,6 @@ qemuMigrationParamsDisableTLS(virDomainObjPtr vm,
}
-int
-qemuMigrationParamsSetCompression(virDomainObjPtr vm ATTRIBUTE_UNUSED,
- qemuMigrationCompressionPtr compression,
- qemuMigrationParamsPtr migParams)
-{
- if (compression->methods & (1ULL << QEMU_MIGRATION_COMPRESS_XBZRLE))
- ignore_value(virBitmapSetBit(migParams->caps,
- QEMU_MONITOR_MIGRATION_CAPS_XBZRLE));
-
- if (compression->methods & (1ULL << QEMU_MIGRATION_COMPRESS_MT))
- ignore_value(virBitmapSetBit(migParams->caps,
- QEMU_MONITOR_MIGRATION_CAPS_COMPRESS));
-
- migParams->params.compressLevel_set = compression->level_set;
- migParams->params.compressLevel = compression->level;
-
- migParams->params.compressThreads_set = compression->threads_set;
- migParams->params.compressThreads = compression->threads;
-
- migParams->params.decompressThreads_set = compression->dthreads_set;
- migParams->params.decompressThreads = compression->dthreads;
-
- migParams->params.xbzrleCacheSize_set = compression->xbzrle_cache_set;
- migParams->params.xbzrleCacheSize = compression->xbzrle_cache;
-
- return 0;
-}
-
-
/* qemuMigrationParamsResetTLS
* @driver: pointer to qemu driver
* @vm: domain object
--
2.17.0