mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user