[libvirt RFCv9 28/31] qemu: migration: expose qemuMigrationParamsSetString

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



change from static to external linkage, and move the
function close to the other similar ones, near
qemuMigrationParamsSetULL.

Signed-off-by: Claudio Fontana <cfontana@xxxxxxx>
---
 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 e107681ba7..ee2cdf9461 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 f2e0a0d9f2..647b8602dd 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





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux