提交 4c94f8d8 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 75f4a7b2
...@@ -532,8 +532,7 @@ virDomainCheckpointDefFormat(virDomainCheckpointDefPtr def, ...@@ -532,8 +532,7 @@ virDomainCheckpointDefFormat(virDomainCheckpointDefPtr def,
int int
virDomainCheckpointRedefinePrep(virDomainPtr domain, virDomainCheckpointRedefinePrep(virDomainObjPtr vm,
virDomainObjPtr vm,
virDomainCheckpointDefPtr *defptr, virDomainCheckpointDefPtr *defptr,
virDomainMomentObjPtr *chk, virDomainMomentObjPtr *chk,
virDomainXMLOptionPtr xmlopt, virDomainXMLOptionPtr xmlopt,
...@@ -544,13 +543,13 @@ virDomainCheckpointRedefinePrep(virDomainPtr domain, ...@@ -544,13 +543,13 @@ virDomainCheckpointRedefinePrep(virDomainPtr domain,
virDomainMomentObjPtr other = NULL; virDomainMomentObjPtr other = NULL;
virDomainCheckpointDefPtr otherdef = NULL; virDomainCheckpointDefPtr otherdef = NULL;
virUUIDFormat(domain->uuid, uuidstr); virUUIDFormat(vm->def->uuid, uuidstr);
if (virDomainCheckpointCheckCycles(vm->checkpoints, def, vm->def->name) < 0) if (virDomainCheckpointCheckCycles(vm->checkpoints, def, vm->def->name) < 0)
return -1; return -1;
if (!def->parent.dom || 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, virReportError(VIR_ERR_INVALID_ARG,
_("definition for checkpoint %s must use uuid %s"), _("definition for checkpoint %s must use uuid %s"),
def->parent.name, uuidstr); def->parent.name, uuidstr);
......
...@@ -90,8 +90,7 @@ virDomainCheckpointDefFormat(virDomainCheckpointDefPtr def, ...@@ -90,8 +90,7 @@ virDomainCheckpointDefFormat(virDomainCheckpointDefPtr def,
int int
virDomainCheckpointAlignDisks(virDomainCheckpointDefPtr checkpoint); virDomainCheckpointAlignDisks(virDomainCheckpointDefPtr checkpoint);
int virDomainCheckpointRedefinePrep(virDomainPtr domain, int virDomainCheckpointRedefinePrep(virDomainObjPtr vm,
virDomainObjPtr vm,
virDomainCheckpointDefPtr *def, virDomainCheckpointDefPtr *def,
virDomainMomentObjPtr *checkpoint, virDomainMomentObjPtr *checkpoint,
virDomainXMLOptionPtr xmlopt, virDomainXMLOptionPtr xmlopt,
......
...@@ -17291,7 +17291,7 @@ qemuDomainCheckpointCreateXML(virDomainPtr domain, ...@@ -17291,7 +17291,7 @@ qemuDomainCheckpointCreateXML(virDomainPtr domain,
goto cleanup; goto cleanup;
if (redefine) { if (redefine) {
if (virDomainCheckpointRedefinePrep(domain, vm, &def, &chk, if (virDomainCheckpointRedefinePrep(vm, &def, &chk,
driver->xmlopt, driver->xmlopt,
&update_current) < 0) &update_current) < 0)
goto endjob; goto endjob;
......
...@@ -9073,7 +9073,7 @@ testDomainCheckpointCreateXML(virDomainPtr domain, ...@@ -9073,7 +9073,7 @@ testDomainCheckpointCreateXML(virDomainPtr domain,
goto cleanup; goto cleanup;
if (redefine) { if (redefine) {
if (virDomainCheckpointRedefinePrep(domain, vm, &def, &chk, if (virDomainCheckpointRedefinePrep(vm, &def, &chk,
privconn->xmlopt, privconn->xmlopt,
&update_current) < 0) &update_current) < 0)
goto cleanup; goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册