Unverified Commit f811f7fd by Marcos Paulo de Souza Committed by Christian Brauner

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: 's avatarMarcos Paulo de Souza <marcos.souza.org@gmail.com>
parent 452badd5
...@@ -62,8 +62,10 @@ int main(int argc, char *argv[]) ...@@ -62,8 +62,10 @@ int main(int argc, char *argv[])
struct lxc_config_items *i; struct lxc_config_items *i;
const char *value; const char *value;
if (argc < 2) if (argc < 2 || strcmp(argv[1], "-h") == 0 ||
strcmp(argv[1], "--help") == 0)
usage(argv[0]); usage(argv[0]);
if (strcmp(argv[1], "-l") == 0) if (strcmp(argv[1], "-l") == 0)
list_config_items(); list_config_items();
for (i = &items[0]; i->name; i++) { for (i = &items[0]; i->name; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment