From: Ivana Hutarova Varekova Date: Thu, 26 Sep 2013 10:00:16 +0000 (+0200) Subject: cgcreate: polish usage function X-Git-Tag: v0.41~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c895f6b880f1055726b97919bf26c65590b1a24;p=thirdparty%2Flibcgroup.git cgcreate: polish usage function This change is suggested by Dhaval Giani . Polish "usage" function of cgcreate tool. Remove a level of indentation. use printf instead of fprintf(stderr,...) Signed-off-by: Ivana Hutarova Varekova Acked-by: Dhaval Giani Acked-by: Jan Safranek --- diff --git a/src/tools/cgcreate.c b/src/tools/cgcreate.c index f1920eab..73abd91d 100644 --- a/src/tools/cgcreate.c +++ b/src/tools/cgcreate.c @@ -37,27 +37,21 @@ static void usage(int status, const char *program_name) fprintf(stderr, "Wrong input parameters," " try %s -h' for more information.\n", program_name); - } else { - fprintf(stdout, "Usage: %s [-h] [-f mode] [-d mode] "\ - "[-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 "\ - "directory permissions\n"); - 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 "\ - "file permissions\n"); - fprintf(stdout, " -t : Owner "\ - "of the tasks file\n"); + return; } + printf("Usage: %s [-h] [-f mode] [-d mode] [-s mode] "\ + "[-t :] [-a :] "\ + "-g : [-g ...]\n", program_name); + printf("Create control group(s)\n"); + printf(" -a : Owner of the group and all "\ + "its files\n"); + printf(" -d, --dperm=mode Group directory permissions\n"); + printf(" -f, --fperm=mode Group file permissions\n"); + printf(" -g : Control group which should be "\ + "added\n"); + printf(" -h, --help Display this help\n"); + printf(" -s, --tperm=mode Tasks file permissions\n"); + printf(" -t : Owner of the tasks file\n"); }