From: Ivana Hutarova Varekova Date: Wed, 18 Jul 2012 19:02:31 +0000 (+0200) Subject: cgclassify: improve help output X-Git-Tag: v0.41~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a434589da423af1e8b01d35021ce04be765f761;p=thirdparty%2Flibcgroup.git cgclassify: improve help output cgclassify: do more verbose help output, accept --help option Signed-off-by: Ivana Hutarova Varekova Acked-by: Jan Safranek --- diff --git a/src/tools/cgclassify.c b/src/tools/cgclassify.c index 3f19a4dc..c136c833 100644 --- a/src/tools/cgclassify.c +++ b/src/tools/cgclassify.c @@ -38,10 +38,17 @@ static void usage(int status, const char *program_name) " try %s -h' for more information.\n", program_name); } else { - printf("usage is %s"\ + printf("Usage: %s"\ "[-g :]" "[--sticky | --cancel-sticky] \n", program_name); + printf("Move running task(s) to given cgroups\n"); + printf(" -g : Control group "\ + "to be displayed (-g is optional)\n"); + printf(" --sticky cgred daemon "\ + "does not change pidlist and children tasks\n"); + printf(" --cancel-sticky cgred daemon "\ + "change pidlist and children tasks\n"); } } @@ -109,6 +116,7 @@ out: static struct option longopts[] = { {"sticky", no_argument, NULL, 's'}, {"cancel-sticky", no_argument, NULL, 'u'}, + {"help", no_argument, NULL, 'h'}, {0, 0, 0, 0} };