mirror of https://gitee.com/openkylin/libvirt.git
virsh: fix missing prompt message for 'snapshot-delete' command
Make the command 'virsh snapshot-delete' has the appropriate prompt message when executing sucessful or failed.
This commit is contained in:
parent
36caaddde6
commit
23cbf1e0d4
1
AUTHORS
1
AUTHORS
|
@ -186,6 +186,7 @@ Patches have also been contributed by:
|
|||
Alex Jia <ajia@redhat.com>
|
||||
Oskari Saarenmaa <os@ohmu.fi>
|
||||
Peter Krempa <pkrempa@redhat.com>
|
||||
Nan Zhang <nzhang@redhat.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
|
|
@ -11534,8 +11534,12 @@ cmdSnapshotDelete(vshControl *ctl, const vshCmd *cmd)
|
|||
if (snapshot == NULL)
|
||||
goto cleanup;
|
||||
|
||||
if (virDomainSnapshotDelete(snapshot, flags) < 0)
|
||||
if (virDomainSnapshotDelete(snapshot, flags) == 0) {
|
||||
vshPrint(ctl, _("Domain snapshot %s deleted\n"), name);
|
||||
} else {
|
||||
vshError(ctl, _("Failed to delete snapshot %s"), name);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue