From: Marcos Paulo de Souza Date: Sat, 30 Dec 2017 18:35:52 +0000 (-0200) Subject: lxc_config: Add -h and --help flags handler X-Git-Tag: lxc-2.0.10~442 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f811f7fd8b8fee2131e5e26b36a3fcb7cc378607;p=thirdparty%2Flxc.git lxc_config: Add -h and --help flags handler As the other tools already handle, show usage message when -h or --help are used. Signed-off-by: Marcos Paulo de Souza --- diff --git a/src/lxc/tools/lxc_config.c b/src/lxc/tools/lxc_config.c index c26b1a0aa..07d1fdedb 100644 --- a/src/lxc/tools/lxc_config.c +++ b/src/lxc/tools/lxc_config.c @@ -62,8 +62,10 @@ int main(int argc, char *argv[]) struct lxc_config_items *i; const char *value; - if (argc < 2) + if (argc < 2 || strcmp(argv[1], "-h") == 0 || + strcmp(argv[1], "--help") == 0) usage(argv[0]); + if (strcmp(argv[1], "-l") == 0) list_config_items(); for (i = &items[0]; i->name; i++) {