From: Ivana Hutarova Varekova Date: Wed, 18 Jul 2012 18:53:38 +0000 (+0200) Subject: cgclear: fix -h option parsing/output X-Git-Tag: v0.41~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12f1361c0dba1714eef7bd2ec9dfe27678a75b18;p=thirdparty%2Flibcgroup.git 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 --- 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} };