mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu: Replace priv with qemuCaps in qemuMigrationCookieParse
QEMU capabilities is the only thing we use from priv so we can just pass that directly. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
8745591457
commit
9e5b42b5eb
@ -3935,7 +3935,8 @@ qemuMigrationSrcConfirmPhase(virQEMUDriver *driver,
|
||||
if (qemuMigrationJobStartPhase(vm, phase) < 0)
|
||||
return -1;
|
||||
|
||||
if (!(mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, priv,
|
||||
if (!(mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname,
|
||||
priv->qemuCaps,
|
||||
cookiein, cookieinlen,
|
||||
QEMU_MIGRATION_COOKIE_STATS)))
|
||||
return -1;
|
||||
@ -4768,7 +4769,8 @@ qemuMigrationSrcRun(virQEMUDriver *driver,
|
||||
}
|
||||
}
|
||||
|
||||
mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, priv,
|
||||
mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname,
|
||||
priv->qemuCaps,
|
||||
cookiein, cookieinlen,
|
||||
cookieFlags |
|
||||
QEMU_MIGRATION_COOKIE_GRAPHICS |
|
||||
@ -5058,7 +5060,8 @@ qemuMigrationSrcResume(virDomainObj *vm,
|
||||
|
||||
VIR_DEBUG("vm=%p", vm);
|
||||
|
||||
mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, priv,
|
||||
mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname,
|
||||
priv->qemuCaps,
|
||||
cookiein, cookieinlen,
|
||||
QEMU_MIGRATION_COOKIE_CAPS);
|
||||
if (!mig)
|
||||
@ -6456,7 +6459,8 @@ qemuMigrationDstFinishOffline(virQEMUDriver *driver,
|
||||
qemuDomainObjPrivate *priv = vm->privateData;
|
||||
g_autoptr(qemuMigrationCookie) mig = NULL;
|
||||
|
||||
if (!(mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, priv,
|
||||
if (!(mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname,
|
||||
priv->qemuCaps,
|
||||
cookiein, cookieinlen, cookie_flags)))
|
||||
return NULL;
|
||||
|
||||
@ -6652,7 +6656,8 @@ qemuMigrationDstFinishActive(virQEMUDriver *driver,
|
||||
VIR_DEBUG("vm=%p, flags=0x%lx, retcode=%d",
|
||||
vm, flags, retcode);
|
||||
|
||||
if (!(mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname, priv,
|
||||
if (!(mig = qemuMigrationCookieParse(driver, vm, vm->def, priv->origname,
|
||||
priv->qemuCaps,
|
||||
cookiein, cookieinlen, cookie_flags)))
|
||||
goto error;
|
||||
|
||||
|
@ -1493,7 +1493,7 @@ qemuMigrationCookieParse(virQEMUDriver *driver,
|
||||
virDomainObj *vm,
|
||||
const virDomainDef *def,
|
||||
const char *origname,
|
||||
qemuDomainObjPrivate *priv,
|
||||
virQEMUCaps *qemuCaps,
|
||||
const char *cookiein,
|
||||
int cookieinlen,
|
||||
unsigned int flags)
|
||||
@ -1514,11 +1514,7 @@ qemuMigrationCookieParse(virQEMUDriver *driver,
|
||||
return NULL;
|
||||
|
||||
if (cookiein && cookieinlen &&
|
||||
qemuMigrationCookieXMLParseStr(mig,
|
||||
driver,
|
||||
priv ? priv->qemuCaps : NULL,
|
||||
cookiein,
|
||||
flags) < 0)
|
||||
qemuMigrationCookieXMLParseStr(mig, driver, qemuCaps, cookiein, flags) < 0)
|
||||
return NULL;
|
||||
|
||||
if (flags & QEMU_MIGRATION_COOKIE_PERSISTENT &&
|
||||
|
@ -192,7 +192,7 @@ qemuMigrationCookieParse(virQEMUDriver *driver,
|
||||
virDomainObj *vm,
|
||||
const virDomainDef *def,
|
||||
const char *origname,
|
||||
qemuDomainObjPrivate *priv,
|
||||
virQEMUCaps *qemuCaps,
|
||||
const char *cookiein,
|
||||
int cookieinlen,
|
||||
unsigned int flags);
|
||||
|
@ -144,7 +144,7 @@ testQemuMigrationCookieParse(const void *opaque)
|
||||
data->vm,
|
||||
data->vm->def,
|
||||
NULL,
|
||||
priv,
|
||||
priv->qemuCaps,
|
||||
data->xmlstr,
|
||||
data->xmlstrlen,
|
||||
data->cookieParseFlags))) {
|
||||
|
Loading…
Reference in New Issue
Block a user