mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
virsh: Make code flow in cmdManagedSaveRemove more straightforward
By doing so we can get rid of the code which violates our coding style guidelines. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
4d31c02f05
commit
88810c5267
@ -4788,18 +4788,19 @@ cmdManagedSaveRemove(vshControl *ctl, const vshCmd *cmd)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (hassave) {
|
||||
if (virDomainManagedSaveRemove(dom, 0) < 0) {
|
||||
vshError(ctl, _("Failed to remove managed save image for domain '%s'"),
|
||||
name);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
vshPrintExtra(ctl, _("Removed managedsave image for domain '%s'"), name);
|
||||
}
|
||||
else
|
||||
if (hassave == 0) {
|
||||
vshPrintExtra(ctl, _("Domain '%s' has no manage save image; removal skipped"),
|
||||
name);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (virDomainManagedSaveRemove(dom, 0) < 0) {
|
||||
vshError(ctl, _("Failed to remove managed save image for domain '%s'"),
|
||||
name);
|
||||
return false;
|
||||
}
|
||||
|
||||
vshPrintExtra(ctl, _("Removed managedsave image for domain '%s'"), name);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user