]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix exit status of lxc controller
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 11 Oct 2013 16:28:31 +0000 (17:28 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 14 Oct 2013 09:31:01 +0000 (10:31 +0100)
The LXC controller main() method initialized 'rc' to 1
rather than '-1'. In the cleanup path it will print any
error to stderr, if-and-only-if rc < 0. Hence the incorrect
initialization caused errors to be lost.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_controller.c

index b881f172de94948f52bcf113510ff4f46160c5bf..1c6aed62d360924d4d3d3a37e53c6dd24efcc8b5 100644 (file)
@@ -2230,7 +2230,7 @@ cleanup:
 int main(int argc, char *argv[])
 {
     pid_t pid;
-    int rc = 1;
+    int rc = -1;
     char *name = NULL;
     size_t nveths = 0;
     char **veths = NULL;