]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: change wexitstatus order to allow compilation on mac osx
authorJustin Clift <jclift@redhat.com>
Wed, 15 Sep 2010 15:08:14 +0000 (01:08 +1000)
committerJustin Clift <jclift@redhat.com>
Wed, 15 Sep 2010 17:37:01 +0000 (03:37 +1000)
This is the simple fix Daniel Veillard suggested last year:

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

tools/virsh.c

index 55deb4c2be884c99c09b26c9b056884b4795ed64..85014f2b5df0d7799231189d607dded64f8547b8 100644 (file)
@@ -8602,7 +8602,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);