]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
libvirt_lxc: Claim success for --help
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 27 Aug 2015 00:21:54 +0000 (02:21 +0200)
committerCole Robinson <crobinso@redhat.com>
Tue, 22 Sep 2015 00:18:03 +0000 (20:18 -0400)
So far, if libvirt_lxc binary (usually to be found under
/usr/libexec/) is run with --help, due to a missing line
and our usual functions pattern, an 'uknown' error is returned.
Yeah, the help is printed out, but we should not claim error.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit fb0ef0d5110dd737bde2b79e17c12b71a69f5d06)

src/lxc/lxc_controller.c

index 110a55662be053e549415c5763a078073b3d4457..9549f3618971316396183159937fc3c87abdeb5e 100644 (file)
@@ -2571,6 +2571,7 @@ int main(int argc, char *argv[])
             fprintf(stderr, "  -S NAME, --security NAME\n");
             fprintf(stderr, "  -h, --help\n");
             fprintf(stderr, "\n");
+            rc = 0;
             goto cleanup;
         }
     }