mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-04 21:47:16 +03:00
conf: Drop pointless 'domain' argument from virDomainCheckpointRedefinePrep
'vm' is passed in which contains the definition which contains the UUID so we don't need another parameter for this. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
75f4a7b2c7
commit
4c94f8d8c1
@ -532,8 +532,7 @@ virDomainCheckpointDefFormat(virDomainCheckpointDefPtr def,
|
||||
|
||||
|
||||
int
|
||||
virDomainCheckpointRedefinePrep(virDomainPtr domain,
|
||||
virDomainObjPtr vm,
|
||||
virDomainCheckpointRedefinePrep(virDomainObjPtr vm,
|
||||
virDomainCheckpointDefPtr *defptr,
|
||||
virDomainMomentObjPtr *chk,
|
||||
virDomainXMLOptionPtr xmlopt,
|
||||
@ -544,13 +543,13 @@ virDomainCheckpointRedefinePrep(virDomainPtr domain,
|
||||
virDomainMomentObjPtr other = NULL;
|
||||
virDomainCheckpointDefPtr otherdef = NULL;
|
||||
|
||||
virUUIDFormat(domain->uuid, uuidstr);
|
||||
virUUIDFormat(vm->def->uuid, uuidstr);
|
||||
|
||||
if (virDomainCheckpointCheckCycles(vm->checkpoints, def, vm->def->name) < 0)
|
||||
return -1;
|
||||
|
||||
if (!def->parent.dom ||
|
||||
memcmp(def->parent.dom->uuid, domain->uuid, VIR_UUID_BUFLEN)) {
|
||||
memcmp(def->parent.dom->uuid, vm->def->uuid, VIR_UUID_BUFLEN)) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("definition for checkpoint %s must use uuid %s"),
|
||||
def->parent.name, uuidstr);
|
||||
|
@ -90,8 +90,7 @@ virDomainCheckpointDefFormat(virDomainCheckpointDefPtr def,
|
||||
int
|
||||
virDomainCheckpointAlignDisks(virDomainCheckpointDefPtr checkpoint);
|
||||
|
||||
int virDomainCheckpointRedefinePrep(virDomainPtr domain,
|
||||
virDomainObjPtr vm,
|
||||
int virDomainCheckpointRedefinePrep(virDomainObjPtr vm,
|
||||
virDomainCheckpointDefPtr *def,
|
||||
virDomainMomentObjPtr *checkpoint,
|
||||
virDomainXMLOptionPtr xmlopt,
|
||||
|
@ -17291,7 +17291,7 @@ qemuDomainCheckpointCreateXML(virDomainPtr domain,
|
||||
goto cleanup;
|
||||
|
||||
if (redefine) {
|
||||
if (virDomainCheckpointRedefinePrep(domain, vm, &def, &chk,
|
||||
if (virDomainCheckpointRedefinePrep(vm, &def, &chk,
|
||||
driver->xmlopt,
|
||||
&update_current) < 0)
|
||||
goto endjob;
|
||||
|
@ -9073,7 +9073,7 @@ testDomainCheckpointCreateXML(virDomainPtr domain,
|
||||
goto cleanup;
|
||||
|
||||
if (redefine) {
|
||||
if (virDomainCheckpointRedefinePrep(domain, vm, &def, &chk,
|
||||
if (virDomainCheckpointRedefinePrep(vm, &def, &chk,
|
||||
privconn->xmlopt,
|
||||
&update_current) < 0)
|
||||
goto cleanup;
|
||||
|
Loading…
x
Reference in New Issue
Block a user