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

[PATCH 1/6] qemu: migration: Rename qemuMigrationBakeCookie to qemuMigrationCookieFormat



Use a more descriptive name and move the verb to the end so that the
functions conform with the naming policy.

Signed-off-by: Peter Krempa <pkrempa redhat com>
---
 src/qemu/qemu_migration.c        | 28 ++++++++++++++--------------
 src/qemu/qemu_migration_cookie.c | 14 +++++++-------
 src/qemu/qemu_migration_cookie.h | 14 +++++++-------
 3 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 5708334d2f..33591ba26b 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2257,10 +2257,10 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver,
                                        priv->origname, priv, NULL, 0, 0)))
         return NULL;

-    if (qemuMigrationBakeCookie(mig, driver, vm,
-                                QEMU_MIGRATION_SOURCE,
-                                cookieout, cookieoutlen,
-                                cookieFlags) < 0)
+    if (qemuMigrationCookieFormat(mig, driver, vm,
+                                  QEMU_MIGRATION_SOURCE,
+                                  cookieout, cookieoutlen,
+                                  cookieFlags) < 0)
         return NULL;

     if (flags & VIR_MIGRATE_OFFLINE) {
@@ -2758,9 +2758,9 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
         goto stopjob;

  done:
-    if (qemuMigrationBakeCookie(mig, driver, vm,
-                                QEMU_MIGRATION_DESTINATION,
-                                cookieout, cookieoutlen, cookieFlags) < 0) {
+    if (qemuMigrationCookieFormat(mig, driver, vm,
+                                  QEMU_MIGRATION_DESTINATION,
+                                  cookieout, cookieoutlen, cookieFlags) < 0) {
         /* We could tear down the whole guest here, but
          * cookie data is (so far) non-critical, so that
          * seems a little harsh. We'll just warn for now.
@@ -3917,9 +3917,9 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver,
                    QEMU_MIGRATION_COOKIE_STATS;

     if (qemuMigrationCookieAddPersistent(mig, &persistDef) < 0 ||
-        qemuMigrationBakeCookie(mig, driver, vm,
-                                QEMU_MIGRATION_SOURCE,
-                                cookieout, cookieoutlen, cookieFlags) < 0) {
+        qemuMigrationCookieFormat(mig, driver, vm,
+                                  QEMU_MIGRATION_SOURCE,
+                                  cookieout, cookieoutlen, cookieFlags) < 0) {
         VIR_WARN("Unable to encode migration cookie");
     }

@@ -5401,10 +5401,10 @@ qemuMigrationDstFinish(virQEMUDriverPtr driver,
             priv->job.completed->statsType = QEMU_DOMAIN_JOB_STATS_TYPE_MIGRATION;
         }

-        if (qemuMigrationBakeCookie(mig, driver, vm,
-                                    QEMU_MIGRATION_DESTINATION,
-                                    cookieout, cookieoutlen,
-                                    QEMU_MIGRATION_COOKIE_STATS) < 0)
+        if (qemuMigrationCookieFormat(mig, driver, vm,
+                                      QEMU_MIGRATION_DESTINATION,
+                                      cookieout, cookieoutlen,
+                                      QEMU_MIGRATION_COOKIE_STATS) < 0)
             VIR_WARN("Unable to encode migration cookie");

         /* Remove completed stats for post-copy, everything but timing fields
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index 3ea46e1527..124f61e3ea 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -1389,13 +1389,13 @@ qemuMigrationCookieXMLParseStr(qemuMigrationCookiePtr mig,


 int
-qemuMigrationBakeCookie(qemuMigrationCookiePtr mig,
-                        virQEMUDriverPtr driver,
-                        virDomainObjPtr dom,
-                        qemuMigrationParty party,
-                        char **cookieout,
-                        int *cookieoutlen,
-                        unsigned int flags)
+qemuMigrationCookieFormat(qemuMigrationCookiePtr mig,
+                          virQEMUDriverPtr driver,
+                          virDomainObjPtr dom,
+                          qemuMigrationParty party,
+                          char **cookieout,
+                          int *cookieoutlen,
+                          unsigned int flags)
 {
     qemuDomainObjPrivatePtr priv = dom->privateData;

diff --git a/src/qemu/qemu_migration_cookie.h b/src/qemu/qemu_migration_cookie.h
index 95e7edb899..587f4206b7 100644
--- a/src/qemu/qemu_migration_cookie.h
+++ b/src/qemu/qemu_migration_cookie.h
@@ -152,13 +152,13 @@ struct _qemuMigrationCookie {


 int
-qemuMigrationBakeCookie(qemuMigrationCookiePtr mig,
-                        virQEMUDriverPtr driver,
-                        virDomainObjPtr dom,
-                        qemuMigrationParty party,
-                        char **cookieout,
-                        int *cookieoutlen,
-                        unsigned int flags);
+qemuMigrationCookieFormat(qemuMigrationCookiePtr mig,
+                          virQEMUDriverPtr driver,
+                          virDomainObjPtr dom,
+                          qemuMigrationParty party,
+                          char **cookieout,
+                          int *cookieoutlen,
+                          unsigned int flags);

 qemuMigrationCookiePtr
 qemuMigrationEatCookie(virQEMUDriverPtr driver,
-- 
2.26.2


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