mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
qemu_snapshot: revert: refactor cleanup section
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
76af9ef656
commit
890a33306a
@ -2256,14 +2256,18 @@ qemuSnapshotRevert(virDomainObj *vm,
|
|||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ret == 0 && defined && vm->persistent &&
|
if (ret == 0 && defined && vm->persistent) {
|
||||||
!(ret = virDomainDefSave(vm->newDef ? vm->newDef : vm->def,
|
virDomainDef *saveDef = vm->newDef ? vm->newDef : vm->def;
|
||||||
driver->xmlopt, cfg->configDir))) {
|
|
||||||
detail = VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT;
|
ret = virDomainDefSave(saveDef, driver->xmlopt, cfg->configDir);
|
||||||
virObjectEventStateQueue(driver->domainEventState,
|
|
||||||
virDomainEventLifecycleNewFromObj(vm,
|
if (ret == 0) {
|
||||||
VIR_DOMAIN_EVENT_DEFINED,
|
detail = VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT;
|
||||||
detail));
|
event = virDomainEventLifecycleNewFromObj(vm,
|
||||||
|
VIR_DOMAIN_EVENT_DEFINED,
|
||||||
|
detail);
|
||||||
|
virObjectEventStateQueue(driver->domainEventState, event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user