This change is suggested by Dhaval Giani <dhaval.gi...@gmail.com>. Polish "usage" function of cgcreate tool. Remove a level of indentation. use printf instead of fprintf(stderr,...)
Signed-off-by: Ivana Hutarova Varekova <varek...@redhat.com> --- src/tools/cgcreate.c | 34 ++++++++++++++-------------------- 1 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/tools/cgcreate.c b/src/tools/cgcreate.c index f1920ea..73abd91 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 <tuid>:<tgid>] [-a <agid>:<auid>] "\ - "-g <controllers>:<path> [-g ...]\n", - program_name); - fprintf(stdout, "Create control group(s)\n"); - fprintf(stdout, " -a <tuid>:<tgid> 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 <controllers>:<path> 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 <tuid>:<tgid> Owner "\ - "of the tasks file\n"); + return; } + printf("Usage: %s [-h] [-f mode] [-d mode] [-s mode] "\ + "[-t <tuid>:<tgid>] [-a <agid>:<auid>] "\ + "-g <controllers>:<path> [-g ...]\n", program_name); + printf("Create control group(s)\n"); + printf(" -a <tuid>:<tgid> 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 <controllers>:<path> Control group which should be "\ + "added\n"); + printf(" -h, --help Display this help\n"); + printf(" -s, --tperm=mode Tasks file permissions\n"); + printf(" -t <tuid>:<tgid> Owner of the tasks file\n"); } ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel