From 12f1361c0dba1714eef7bd2ec9dfe27678a75b18 Mon Sep 17 00:00:00 2001 From: Ivana Hutarova Varekova Date: Wed, 18 Jul 2012 20:53:38 +0200 Subject: [PATCH] cgclear: fix -h option parsing/output add -h to parsed options create more verbose -h output Signed-off-by: Ivana Hutarova Varekova Acked-by: Jan Safranek Acked-by: Dhaval Giani --- src/tools/cgclear.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/tools/cgclear.c b/src/tools/cgclear.c index 9cfc6842..1e00560f 100644 --- a/src/tools/cgclear.c +++ b/src/tools/cgclear.c @@ -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} }; -- 2.47.2