[libvirt] [PATCH] virsh: change wexitstatus order to allow compilation on mac osx

Justin Clift jclift at redhat.com
Wed Sep 15 15:22:49 UTC 2010


This is the simple fix Daniel Veillard suggested last year:

  http://www.redhat.com/archives/libvir-list/2009-May/msg00459.html
---

 tools/virsh.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 57ea618..c148f7b 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -8646,7 +8646,7 @@ editFile (vshControl *ctl, const char *filename)
         VIR_FREE(command);
         return -1;
     }
-    if (command_ret != WEXITSTATUS (0)) {
+    if (WEXITSTATUS(command_ret) != 0) {
         vshError(ctl,
                  _("%s: command exited with non-zero status"), command);
         VIR_FREE(command);
-- 
1.7.2.2




More information about the libvir-list mailing list