mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
snapshot: qemu: Separate logic blocks with newlines
This commit is contained in:
parent
51b12b8cca
commit
4494b11f8f
@ -11365,6 +11365,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
|
||||
goto cleanup;
|
||||
|
||||
}
|
||||
|
||||
if (def->dom &&
|
||||
memcmp(def->dom->uuid, domain->uuid, VIR_UUID_BUFLEN)) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
@ -11372,6 +11373,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
|
||||
def->name, uuidstr);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
other = virDomainSnapshotFindByName(vm->snapshots, def->name);
|
||||
if (other) {
|
||||
if ((other->def->state == VIR_DOMAIN_RUNNING ||
|
||||
@ -11384,6 +11386,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
|
||||
def->name);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((other->def->state == VIR_DOMAIN_DISK_SNAPSHOT) !=
|
||||
(def->state == VIR_DOMAIN_DISK_SNAPSHOT)) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
@ -11392,6 +11395,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
|
||||
def->name);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (other->def->dom) {
|
||||
if (def->dom) {
|
||||
if (!virDomainDefCheckABIStability(other->def->dom,
|
||||
@ -11403,10 +11407,12 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
|
||||
other->def->dom = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (other == vm->current_snapshot) {
|
||||
update_current = true;
|
||||
vm->current_snapshot = NULL;
|
||||
}
|
||||
|
||||
/* Drop and rebuild the parent relationship, but keep all
|
||||
* child relations by reusing snap. */
|
||||
virDomainSnapshotDropParent(other);
|
||||
|
Loading…
x
Reference in New Issue
Block a user