[libvirt RFCv8 24/27] qemu: migration: expose qemuMigrationParamsSetString

Claudio Fontana posted 27 patches 1 month, 2 weeks ago
[libvirt RFCv8 24/27] qemu: migration: expose qemuMigrationParamsSetString
Posted by Claudio Fontana 1 month, 2 weeks ago
change from static to external linkage, and move the
function close to the other similar ones, near
qemuMigrationParamsSetULL.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
---
 src/qemu/qemu_migration_params.c | 47 +++++++++++++++-----------------
 src/qemu/qemu_migration_params.h |  5 ++++
 2 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index 75b29e93a1..f6b9dc337d 100644
--- a/src/qemu/qemu_migration_params.c
+++ b/src/qemu/qemu_migration_params.c
@@ -900,31 +900,6 @@ qemuMigrationParamsApply(virQEMUDriver *driver,
 }
 
 
-/**
- * qemuMigrationParamsSetString:
- * @migrParams: migration parameter object
- * @param: parameter to set
- * @value: new value
- *
- * Enables and sets the migration parameter @param in @migrParams. Returns 0 on
- * success and -1 on error. Libvirt error is reported.
- */
-static int
-qemuMigrationParamsSetString(qemuMigrationParams *migParams,
-                             qemuMigrationParam param,
-                             const char *value)
-{
-    if (qemuMigrationParamsCheckType(param, QEMU_MIGRATION_PARAM_TYPE_STRING) < 0)
-        return -1;
-
-    migParams->params[param].value.s = g_strdup(value);
-
-    migParams->params[param].set = true;
-
-    return 0;
-}
-
-
 /* qemuMigrationParamsEnableTLS
  * @driver: pointer to qemu driver
  * @vm: domain object
@@ -1146,6 +1121,28 @@ qemuMigrationParamsSetULL(qemuMigrationParams *migParams,
     return 0;
 }
 
+/**
+ * qemuMigrationParamsSetString:
+ * @migrParams: migration parameter object
+ * @param: parameter to set
+ * @value: new value
+ *
+ * Enables and sets the migration parameter @param in @migrParams. Returns 0 on
+ * success and -1 on error. Libvirt error is reported.
+ */
+int
+qemuMigrationParamsSetString(qemuMigrationParams *migParams,
+                             qemuMigrationParam param,
+                             const char *value)
+{
+    if (qemuMigrationParamsCheckType(param, QEMU_MIGRATION_PARAM_TYPE_STRING) < 0)
+        return -1;
+
+    migParams->params[param].value.s = g_strdup(value);
+    migParams->params[param].set = true;
+    return 0;
+}
+
 
 /**
  * Returns -1 on error,
diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_params.h
index 8b2d6ab210..23a4e0c8a2 100644
--- a/src/qemu/qemu_migration_params.h
+++ b/src/qemu/qemu_migration_params.h
@@ -138,6 +138,11 @@ qemuMigrationParamsSetULL(qemuMigrationParams *migParams,
                           qemuMigrationParam param,
                           unsigned long long value);
 
+int
+qemuMigrationParamsSetString(qemuMigrationParams *migParams,
+                             qemuMigrationParam param,
+                             const char *value);
+
 int
 qemuMigrationParamsGetULL(qemuMigrationParams *migParams,
                           qemuMigrationParam param,
-- 
2.35.3