提交 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,
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册