mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: migration: Rename qemuMigrationEatCookie to qemuMigrationCookieParse
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> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
5b32815d1a
commit
43f0944f66
@ -2602,15 +2602,15 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
|
|||||||
/* Parse cookie earlier than adding the domain onto the
|
/* Parse cookie earlier than adding the domain onto the
|
||||||
* domain list. Parsing/validation may fail and there's no
|
* domain list. Parsing/validation may fail and there's no
|
||||||
* point in having the domain in the list at that point. */
|
* point in having the domain in the list at that point. */
|
||||||
if (!(mig = qemuMigrationEatCookie(driver, *def, origname, NULL,
|
if (!(mig = qemuMigrationCookieParse(driver, *def, origname, NULL,
|
||||||
cookiein, cookieinlen,
|
cookiein, cookieinlen,
|
||||||
QEMU_MIGRATION_COOKIE_LOCKSTATE |
|
QEMU_MIGRATION_COOKIE_LOCKSTATE |
|
||||||
QEMU_MIGRATION_COOKIE_NBD |
|
QEMU_MIGRATION_COOKIE_NBD |
|
||||||
QEMU_MIGRATION_COOKIE_MEMORY_HOTPLUG |
|
QEMU_MIGRATION_COOKIE_MEMORY_HOTPLUG |
|
||||||
QEMU_MIGRATION_COOKIE_CPU_HOTPLUG |
|
QEMU_MIGRATION_COOKIE_CPU_HOTPLUG |
|
||||||
QEMU_MIGRATION_COOKIE_CPU |
|
QEMU_MIGRATION_COOKIE_CPU |
|
||||||
QEMU_MIGRATION_COOKIE_ALLOW_REBOOT |
|
QEMU_MIGRATION_COOKIE_ALLOW_REBOOT |
|
||||||
QEMU_MIGRATION_COOKIE_CAPS)))
|
QEMU_MIGRATION_COOKIE_CAPS)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(vm = virDomainObjListAdd(driver->domains, *def,
|
if (!(vm = virDomainObjListAdd(driver->domains, *def,
|
||||||
@ -3122,9 +3122,9 @@ qemuMigrationSrcConfirmPhase(virQEMUDriverPtr driver,
|
|||||||
? QEMU_MIGRATION_PHASE_CONFIRM3
|
? QEMU_MIGRATION_PHASE_CONFIRM3
|
||||||
: QEMU_MIGRATION_PHASE_CONFIRM3_CANCELLED);
|
: QEMU_MIGRATION_PHASE_CONFIRM3_CANCELLED);
|
||||||
|
|
||||||
if (!(mig = qemuMigrationEatCookie(driver, vm->def, priv->origname, priv,
|
if (!(mig = qemuMigrationCookieParse(driver, vm->def, priv->origname, priv,
|
||||||
cookiein, cookieinlen,
|
cookiein, cookieinlen,
|
||||||
QEMU_MIGRATION_COOKIE_STATS)))
|
QEMU_MIGRATION_COOKIE_STATS)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (retcode == 0)
|
if (retcode == 0)
|
||||||
@ -3672,11 +3672,11 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mig = qemuMigrationEatCookie(driver, vm->def, priv->origname, priv,
|
mig = qemuMigrationCookieParse(driver, vm->def, priv->origname, priv,
|
||||||
cookiein, cookieinlen,
|
cookiein, cookieinlen,
|
||||||
cookieFlags |
|
cookieFlags |
|
||||||
QEMU_MIGRATION_COOKIE_GRAPHICS |
|
QEMU_MIGRATION_COOKIE_GRAPHICS |
|
||||||
QEMU_MIGRATION_COOKIE_CAPS);
|
QEMU_MIGRATION_COOKIE_CAPS);
|
||||||
if (!mig)
|
if (!mig)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
@ -5208,8 +5208,8 @@ qemuMigrationDstFinish(virQEMUDriverPtr driver,
|
|||||||
* even though VIR_MIGRATE_PERSIST_DEST was not used. */
|
* even though VIR_MIGRATE_PERSIST_DEST was not used. */
|
||||||
cookie_flags |= QEMU_MIGRATION_COOKIE_PERSISTENT;
|
cookie_flags |= QEMU_MIGRATION_COOKIE_PERSISTENT;
|
||||||
|
|
||||||
if (!(mig = qemuMigrationEatCookie(driver, vm->def, priv->origname, priv,
|
if (!(mig = qemuMigrationCookieParse(driver, vm->def, priv->origname, priv,
|
||||||
cookiein, cookieinlen, cookie_flags)))
|
cookiein, cookieinlen, cookie_flags)))
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
if (flags & VIR_MIGRATE_OFFLINE) {
|
if (flags & VIR_MIGRATE_OFFLINE) {
|
||||||
|
@ -1441,13 +1441,13 @@ qemuMigrationCookieFormat(qemuMigrationCookiePtr mig,
|
|||||||
|
|
||||||
|
|
||||||
qemuMigrationCookiePtr
|
qemuMigrationCookiePtr
|
||||||
qemuMigrationEatCookie(virQEMUDriverPtr driver,
|
qemuMigrationCookieParse(virQEMUDriverPtr driver,
|
||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
const char *origname,
|
const char *origname,
|
||||||
qemuDomainObjPrivatePtr priv,
|
qemuDomainObjPrivatePtr priv,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
g_autoptr(qemuMigrationCookie) mig = NULL;
|
g_autoptr(qemuMigrationCookie) mig = NULL;
|
||||||
|
|
||||||
|
@ -165,13 +165,13 @@ qemuMigrationCookieFormat(qemuMigrationCookiePtr mig,
|
|||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
qemuMigrationCookiePtr
|
qemuMigrationCookiePtr
|
||||||
qemuMigrationEatCookie(virQEMUDriverPtr driver,
|
qemuMigrationCookieParse(virQEMUDriverPtr driver,
|
||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
const char *origname,
|
const char *origname,
|
||||||
qemuDomainObjPrivatePtr priv,
|
qemuDomainObjPrivatePtr priv,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
void
|
void
|
||||||
qemuMigrationCookieFree(qemuMigrationCookiePtr mig);
|
qemuMigrationCookieFree(qemuMigrationCookiePtr mig);
|
||||||
|
Loading…
Reference in New Issue
Block a user