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(a)redhat.com>
---
src/qemu/qemu_migration.c | 38 ++++++++++++++++----------------
src/qemu/qemu_migration_cookie.c | 14 ++++++------
src/qemu/qemu_migration_cookie.h | 14 ++++++------
3 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 7017058089..009b556d0a 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2592,15 +2592,15 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
/* Parse cookie earlier than adding the domain onto the
* domain list. Parsing/validation may fail and there's no
* point in having the domain in the list at that point. */
- if (!(mig = qemuMigrationEatCookie(driver, *def, origname, NULL,
- cookiein, cookieinlen,
- QEMU_MIGRATION_COOKIE_LOCKSTATE |
- QEMU_MIGRATION_COOKIE_NBD |
- QEMU_MIGRATION_COOKIE_MEMORY_HOTPLUG |
- QEMU_MIGRATION_COOKIE_CPU_HOTPLUG |
- QEMU_MIGRATION_COOKIE_CPU |
- QEMU_MIGRATION_COOKIE_ALLOW_REBOOT |
- QEMU_MIGRATION_COOKIE_CAPS)))
+ if (!(mig = qemuMigrationCookieParse(driver, *def, origname, NULL,
+ cookiein, cookieinlen,
+ QEMU_MIGRATION_COOKIE_LOCKSTATE |
+ QEMU_MIGRATION_COOKIE_NBD |
+ QEMU_MIGRATION_COOKIE_MEMORY_HOTPLUG |
+ QEMU_MIGRATION_COOKIE_CPU_HOTPLUG |
+ QEMU_MIGRATION_COOKIE_CPU |
+ QEMU_MIGRATION_COOKIE_ALLOW_REBOOT |
+ QEMU_MIGRATION_COOKIE_CAPS)))
goto cleanup;
if (!(vm = virDomainObjListAdd(driver->domains, *def,
@@ -3112,9 +3112,9 @@ qemuMigrationSrcConfirmPhase(virQEMUDriverPtr driver,
? QEMU_MIGRATION_PHASE_CONFIRM3
: QEMU_MIGRATION_PHASE_CONFIRM3_CANCELLED);
- if (!(mig = qemuMigrationEatCookie(driver, vm->def, priv->origname, priv,
- cookiein, cookieinlen,
- QEMU_MIGRATION_COOKIE_STATS)))
+ if (!(mig = qemuMigrationCookieParse(driver, vm->def, priv->origname, priv,
+ cookiein, cookieinlen,
+ QEMU_MIGRATION_COOKIE_STATS)))
return -1;
if (retcode == 0)
@@ -3662,11 +3662,11 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver,
}
}
- mig = qemuMigrationEatCookie(driver, vm->def, priv->origname, priv,
- cookiein, cookieinlen,
- cookieFlags |
- QEMU_MIGRATION_COOKIE_GRAPHICS |
- QEMU_MIGRATION_COOKIE_CAPS);
+ mig = qemuMigrationCookieParse(driver, vm->def, priv->origname, priv,
+ cookiein, cookieinlen,
+ cookieFlags |
+ QEMU_MIGRATION_COOKIE_GRAPHICS |
+ QEMU_MIGRATION_COOKIE_CAPS);
if (!mig)
goto error;
@@ -5198,8 +5198,8 @@ qemuMigrationDstFinish(virQEMUDriverPtr driver,
* even though VIR_MIGRATE_PERSIST_DEST was not used. */
cookie_flags |= QEMU_MIGRATION_COOKIE_PERSISTENT;
- if (!(mig = qemuMigrationEatCookie(driver, vm->def, priv->origname, priv,
- cookiein, cookieinlen, cookie_flags)))
+ if (!(mig = qemuMigrationCookieParse(driver, vm->def, priv->origname, priv,
+ cookiein, cookieinlen, cookie_flags)))
goto endjob;
if (flags & VIR_MIGRATE_OFFLINE) {
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index 1596ab914b..c128f541dd 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -1441,13 +1441,13 @@ qemuMigrationCookieFormat(qemuMigrationCookiePtr mig,
qemuMigrationCookiePtr
-qemuMigrationEatCookie(virQEMUDriverPtr driver,
- const virDomainDef *def,
- const char *origname,
- qemuDomainObjPrivatePtr priv,
- const char *cookiein,
- int cookieinlen,
- unsigned int flags)
+qemuMigrationCookieParse(virQEMUDriverPtr driver,
+ const virDomainDef *def,
+ const char *origname,
+ qemuDomainObjPrivatePtr priv,
+ const char *cookiein,
+ int cookieinlen,
+ unsigned int flags)
{
g_autoptr(qemuMigrationCookie) mig = NULL;
diff --git a/src/qemu/qemu_migration_cookie.h b/src/qemu/qemu_migration_cookie.h
index dee1e9c8b9..f2801b2704 100644
--- a/src/qemu/qemu_migration_cookie.h
+++ b/src/qemu/qemu_migration_cookie.h
@@ -165,13 +165,13 @@ qemuMigrationCookieFormat(qemuMigrationCookiePtr mig,
unsigned int flags);
qemuMigrationCookiePtr
-qemuMigrationEatCookie(virQEMUDriverPtr driver,
- const virDomainDef *def,
- const char *origname,
- qemuDomainObjPrivatePtr priv,
- const char *cookiein,
- int cookieinlen,
- unsigned int flags);
+qemuMigrationCookieParse(virQEMUDriverPtr driver,
+ const virDomainDef *def,
+ const char *origname,
+ qemuDomainObjPrivatePtr priv,
+ const char *cookiein,
+ int cookieinlen,
+ unsigned int flags);
void
qemuMigrationCookieFree(qemuMigrationCookiePtr mig);
--
2.26.2