From: Jan Safranek Date: Fri, 9 Dec 2011 14:04:41 +0000 (+0100) Subject: cgcreate, cgconfigparser: Fixed help and documentation style. X-Git-Tag: v0.38~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2030dddbd864577ffd729dcc2f44872a8a0c184;p=thirdparty%2Flibcgroup.git cgcreate, cgconfigparser: Fixed help and documentation style. Rephrase the documentation to common style and fix minor typos. Signed-off-by: Jan Safranek --- diff --git a/doc/man/cgcreate.1 b/doc/man/cgcreate.1 index 259b70ee..5bab19a2 100644 --- a/doc/man/cgcreate.1 +++ b/doc/man/cgcreate.1 @@ -21,13 +21,13 @@ allowed to set subsystem parameters and create subgroups. The default value is the same as has the parent cgroup. .TP -.B -d, --dperm mode +.B -d, --dperm=mode sets the permissions of a control groups directory. The permissions needs to be specified as octal numbers e.g. \fB-d 775\fR. .TP -.B -f, --fperm mode +.B -f, --fperm=mode sets the permissions of the control groups parameters. The permissions needs to be specified as octal numbers e.g. \fB-f 775\fR. @@ -48,7 +48,7 @@ multiple times. display this help and exit .TP -.B -s, --tperm mode +.B -s, --tperm=mode sets the permissions of the control group tasks file. The permissions needs to be specified as octal numbers e.g. \fB-f 775\fR. diff --git a/src/tools/cgconfig.c b/src/tools/cgconfig.c index 038c8f81..bf9bfa8d 100644 --- a/src/tools/cgconfig.c +++ b/src/tools/cgconfig.c @@ -37,7 +37,9 @@ static struct cgroup_string_list cfg_files; static void usage(char *progname) { - printf("Usage: %s [-l FILE] ...\n", basename(progname)); + printf("Usage: %s [-h] [-f mode] [-d mode] [-s mode] "\ + "[-t :] [-a :] "\ + "[-l FILE] [-L directory] ...\n", basename(progname)); printf("Parse and load the specified cgroups configuration file\n"); printf("\n"); printf(" -h, --help Display this help\n"); @@ -47,14 +49,14 @@ static void usage(char *progname) " configuration files from a directory\n"); printf(" -a : Default owner of groups files"\ " and directories\n"); - printf(" -d, --dperm mode Default group directory"\ + printf(" -d, --dperm=mode Default group directory"\ " permissions\n"); - printf(" -f, --fperm mode Default group file"\ + 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"); + "file\n"); exit(2); } diff --git a/src/tools/cgcreate.c b/src/tools/cgcreate.c index ae079a1c..cda56814 100644 --- a/src/tools/cgcreate.c +++ b/src/tools/cgcreate.c @@ -39,23 +39,23 @@ static void usage(int status, const char *program_name) program_name); } else { fprintf(stdout, "Usage: %s [-h] [-f mode] [-d mode] "\ - "[-t :] [-a :] "\ + "[-s mode] [-t :] [-a :] "\ "-g : [-g ...]\n", program_name); - fprintf(stdout, " -a : Set "\ - "the admin permission\n"); - fprintf(stdout, " -d, --dperm mode Group "\ + fprintf(stdout, " -a : Owner "\ + "of the group and all its files\n"); + fprintf(stdout, " -d, --dperm=mode Group "\ "directory permissions\n"); - fprintf(stdout, " -f, --fperm mode Group "\ + fprintf(stdout, " -f, --fperm=mode Group "\ "file permissions\n"); fprintf(stdout, " -g : Control "\ "group which should be added\n"); fprintf(stdout, " -h, --help Display "\ "this help\n"); - fprintf(stdout, " -s --tperm mode Tasks "\ + fprintf(stdout, " -s --tperm=mode Tasks "\ "file permissions\n"); - fprintf(stdout, " -t : Set "\ - "the task permission\n"); + fprintf(stdout, " -t : Owner "\ + "of the tasks file\n"); } }