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-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c3e0cb5309c6eddc3004284e096074650f14395;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/lxc_config.c b/src/lxc/lxc_config.c index 0658beb8d..864ff3f3a 100644 --- a/src/lxc/lxc_config.c +++ b/src/lxc/lxc_config.c @@ -59,7 +59,8 @@ int main(int argc, char *argv[]) { struct lxc_config_items *i; - 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();