[PATCH] virsh: say save-image-edit failed only when it does

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

 



The common code for editing files in virsh-edit.c expects EDIT_DEFINE to
return 0 on failure. virDomainSaveImageDefineXML returns 0 on success.
---
 tools/virsh-domain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 33b1727..69e0133 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -2973,7 +2973,7 @@ cmdSaveImageEdit(vshControl *ctl, const vshCmd *cmd)
                     "not changed.\n"), file);           \
     ret = true; goto edit_cleanup;
 #define EDIT_DEFINE \
-    virDomainSaveImageDefineXML(ctl->conn, file, doc_edited, define_flags)
+    (virDomainSaveImageDefineXML(ctl->conn, file, doc_edited, define_flags) == 0)
 #define EDIT_FREE /* */
 #include "virsh-edit.c"
 
-- 
1.7.8.6

--
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]