From: Ivana Hutarova Varekova Date: Wed, 18 Jul 2012 18:53:09 +0000 (+0200) Subject: unify libcgroup tools -h output X-Git-Tag: v0.41~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4a947244075432f6c694ce06c5b100396f21d58;p=thirdparty%2Flibcgroup.git unify libcgroup tools -h output unify libcgroup tools -h output use : as a parameter of -g * cgclassify * cgget fix typos * cgget * cgset fix indentation * cgconfig * cgsnapshot Signed-off-by: Ivana Hutarova Varekova Acked-by: Jan Safranek Acked-by: Dhaval Giani --- diff --git a/src/tools/cgclassify.c b/src/tools/cgclassify.c index 397b7252..3f19a4dc 100644 --- a/src/tools/cgclassify.c +++ b/src/tools/cgclassify.c @@ -38,9 +38,9 @@ static void usage(int status, const char *program_name) " try %s -h' for more information.\n", program_name); } else { - printf("usage is %s " - "[-g :] " - "[--sticky | --cancel-sticky] \n", + printf("usage is %s"\ + "[-g :]" + "[--sticky | --cancel-sticky] \n", program_name); } } diff --git a/src/tools/cgconfig.c b/src/tools/cgconfig.c index bf9bfa8d..da4486bc 100644 --- a/src/tools/cgconfig.c +++ b/src/tools/cgconfig.c @@ -39,7 +39,7 @@ static void usage(char *progname) { printf("Usage: %s [-h] [-f mode] [-d mode] [-s mode] "\ "[-t :] [-a :] "\ - "[-l FILE] [-L directory] ...\n", basename(progname)); + "[-l FILE] [-L DIR] ...\n", basename(progname)); printf("Parse and load the specified cgroups configuration file\n"); printf("\n"); printf(" -h, --help Display this help\n"); @@ -53,7 +53,7 @@ static void usage(char *progname) " permissions\n"); printf(" -f, --fperm=mode Default group file"\ " permissions\n"); - printf(" -s --tperm=mode Default tasks file" + printf(" -s, --tperm=mode Default tasks file" " permissions\n"); printf(" -t : Default owner of the tasks " "file\n"); diff --git a/src/tools/cgcreate.c b/src/tools/cgcreate.c index d10bd454..b0003b1e 100644 --- a/src/tools/cgcreate.c +++ b/src/tools/cgcreate.c @@ -42,6 +42,7 @@ static void usage(int status, const char *program_name) "[-s mode] [-t :] [-a :] "\ "-g : [-g ...]\n", program_name); + fprintf(stdout, "Create control group(s)\n"); fprintf(stdout, " -a : Owner "\ "of the group and all its files\n"); fprintf(stdout, " -d, --dperm=mode Group "\ diff --git a/src/tools/cgget.c b/src/tools/cgget.c index ea638b4c..49a447c6 100644 --- a/src/tools/cgget.c +++ b/src/tools/cgget.c @@ -39,16 +39,16 @@ static void usage(int status, const char *program_name) program_name); else { fprintf(stdout, "Usage: %s [-nv] [-r ] "\ - "[-g ] [-a] ...\n", program_name); + "[-g ] [-a] ...\n", program_name); fprintf(stdout, " or: %s [-nv] [-r ] "\ - "-g : ...\n", program_name); + "-g : ...\n", program_name); fprintf(stdout, "Print parameter(s) of given group(s).\n"); fprintf(stdout, " -a, --all "\ "Print info about all relevant controllers\n"); - fprintf(stdout, " -g "\ - "Controller which info should be displaied\n"); - fprintf(stdout, " -g : "\ - "Control group whih info should be displaied\n"); + fprintf(stdout, " -g "\ + "Controller which info should be displayed\n"); + fprintf(stdout, " -g : "\ + "Control group which info should be displayed\n"); fprintf(stdout, " -h, --help "\ "Display this help\n"); fprintf(stdout, " -n "\ @@ -407,7 +407,7 @@ int main(int argc, char *argv[]) if (((group_needed == 2) && (argv[optind])) || ((group_needed != 2) && (!argv[optind]))) { - /* mixed -g : and or path not set */ + /* mixed -g : and or path not set */ usage(1, argv[0]); result = -1; goto err; diff --git a/src/tools/cgset.c b/src/tools/cgset.c index c631e0fe..8f1af524 100644 --- a/src/tools/cgset.c +++ b/src/tools/cgset.c @@ -63,7 +63,7 @@ static void usage(int status, const char *program_name) program_name); else { printf("Usage: %s [-r ] ...\n" - " or: %s --copy-from " + " or: %s --copy-from " " ...\n", program_name, program_name); } diff --git a/src/tools/cgsnapshot.c b/src/tools/cgsnapshot.c index c1454298..324f93b5 100644 --- a/src/tools/cgsnapshot.c +++ b/src/tools/cgsnapshot.c @@ -60,21 +60,21 @@ static void usage(int status, const char *program_name) " try %s -h' for more information.\n", program_name); } else { - fprintf(stdout, "Usage: %s [-h] [-s] [-b file] "\ - "[-w file] [-f output_file] "\ + fprintf(stdout, "Usage: %s [-h] [-s] [-b FILE] "\ + "[-w FILE] [-f FILE] "\ "[controller] [...]\n", program_name); fprintf(stdout, "Generate the configuration file from "\ "the given controllers of control groups\n"); - fprintf(stdout, " -b,--blacklist file Set the blacklist"\ + fprintf(stdout, " -b, --blacklist=FILE Set the blacklist"\ " configuration file (default %s)\n", BLACKLIST_CONF); - fprintf(stdout, " -f,--file Redirect the output"\ + fprintf(stdout, " -f, --file=FILE Redirect the output"\ " to output_file\n"); - fprintf(stdout, " -h,--help Display this help\n"); - fprintf(stdout, " -s,--silent Ignore all "\ + fprintf(stdout, " -h, --help Display this help\n"); + fprintf(stdout, " -s, --silent Ignore all "\ "warnings\n"); - fprintf(stdout, " -t,--strict Don't show the "\ + fprintf(stdout, " -t, --strict Don't show the "\ "variables which are not on the whitelist\n"); - fprintf(stdout, " -w,--whitelist file Set the whitelist"\ + fprintf(stdout, " -w, --whitelist=FILE Set the whitelist"\ " configuration file (don't used by default)\n"); } }