From 6c8b68b312ed94f9c4e907cb35e24bfaed204fd0 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 28 Sep 2020 16:49:28 +0200 Subject: [PATCH] qemu: migration: Rename qemuMigrationBakeCookie to qemuMigrationCookieFormat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ján Tomko --- 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 2f24d56312..9eaf3fcd39 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2267,10 +2267,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) { @@ -2768,9 +2768,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. @@ -3927,9 +3927,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"); } @@ -5411,10 +5411,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,