[PATCH] virsh: fix missing prompt message for 'snapshot-delete' command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make the command 'virsh snapshot-delete' has the appropriate prompt
message when executing sucessful or failed.
---
 tools/virsh.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index cd17f42..b7cea58 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -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;
 
-- 
1.7.4.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]