]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
cgclear: fix -h option parsing/output
authorIvana Hutarova Varekova <varekova@redhat.com>
Wed, 18 Jul 2012 18:53:38 +0000 (20:53 +0200)
committerIvana Hutarova Varekova <varekova@redhat.com>
Wed, 18 Jul 2012 18:53:38 +0000 (20:53 +0200)
add -h to parsed options
create more verbose -h output

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Acked-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
src/tools/cgclear.c

index 9cfc6842be4c0d5a1b915a8807ff332f0f76db61..1e00560f22d4be6b42b9e08eb34702f5388c8c1b 100644 (file)
@@ -33,8 +33,16 @@ static void usage(int status, const char *program_name)
                        " try %s -h' for more information.\n",
                        program_name);
        } else {
-               printf("%s [-e] [-l config file] [-L directory] ...\n",
-                               program_name);
+               printf("Usage: %s [-h] [-l FILE] [-L DIR] [-e]\n",
+                       program_name);
+               printf("Unload the cgroup filesystem\n");
+               printf("  -h, --help                    Display this help\n");
+               printf("  -e, --empty                   Remove only empty"\
+                       " cgroups\n");
+               printf("  -l, --load=FILE               Parse and load"\
+                       "the cgroups configuration file\n");
+               printf("  -L, --load-directory=DIR      Parse and load"\
+                       "the cgroups configuration files from a directory\n");
        }
 }
 
@@ -61,6 +69,7 @@ int main(int argc, char *argv[])
                        {"load", required_argument, 0,  'l' },
                        {"load-directory", required_argument, 0,  'L' },
                        {"only-empty", no_argument, 0,  'e' },
+                       {"help", no_argument, 0, 'h'},
                        { 0, 0, 0, 0}
        };