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

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



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


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