Skip to content

Commit

Permalink
lxc_config: Add -h and --help flags handler
Browse files Browse the repository at this point in the history
As the other tools already handle, show usage message when -h or --help
are used.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
  • Loading branch information
marcosps committed Dec 30, 2017
1 parent c326c19 commit f63ac53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lxc/tools/lxc_config.c
Expand Up @@ -64,7 +64,8 @@ int main(int argc, char *argv[])

setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);

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();
Expand Down

0 comments on commit f63ac53

Please sign in to comment.