From: Ivana Hutarova Varekova Date: Thu, 26 Sep 2013 09:57:26 +0000 (+0200) Subject: cgconfig: polish usage function X-Git-Tag: v0.41~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1932d7e0801fa2d868577dcfb5ba8827f59bf0d9;p=thirdparty%2Flibcgroup.git cgconfig: polish usage function This change is suggested by Dhaval Giani . Polish "usage" function of cgconfig tool. Remove a level of indentation. Signed-off-by: Ivana Hutarova Varekova Acked-by: Dhaval Giani Acked-by: Jan Safranek --- diff --git a/src/tools/cgconfig.c b/src/tools/cgconfig.c index 5f19f708..cee007ec 100644 --- a/src/tools/cgconfig.c +++ b/src/tools/cgconfig.c @@ -40,29 +40,28 @@ static void usage(int status, char *progname) if (status != 0) { fprintf(stderr, "Wrong input parameters, "\ "try %s -h' for more information.\n", progname); - } else { - printf("Usage: %s [-h] [-f mode] [-d mode] [-s mode] "\ - "[-t :] [-a :] "\ - "[-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"); - 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"); - printf(" -a : Default owner of "\ - "groups files and directories\n"); - printf(" -d, --dperm=mode Default group "\ - "directory permissions\n"); - printf(" -f, --fperm=mode Default group file "\ - "permissions\n"); - printf(" -s, --tperm=mode Default tasks file "\ - "permissions\n"); - printf(" -t : Default owner of "\ - "the tasks file\n"); + return; } + printf("Usage: %s [-h] [-f mode] [-d mode] [-s mode] "\ + "[-t :] [-a :] [-l FILE] "\ + "[-L DIR] ...\n", basename(progname)); + printf("\n"); + printf("Parse and load the specified cgroups configuration file\n"); + printf(" -h, --help Display this help\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"); + printf(" -a : Default owner of groups files "\ + "and directories\n"); + printf(" -d, --dperm=mode Default group directory "\ + "permissions\n"); + printf(" -f, --fperm=mode Default group file "\ + "permissions\n"); + printf(" -s, --tperm=mode Default tasks file "\ + "permissions\n"); + printf(" -t : Default owner of the tasks "\ + "file\n"); } int main(int argc, char *argv[])