]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
cgset: polish usage function
authorIvana Hutarova Varekova <varekova@redhat.com>
Fri, 27 Sep 2013 05:17:07 +0000 (07:17 +0200)
committerIvana Hutarova Varekova <varekova@redhat.com>
Fri, 27 Sep 2013 05:17:07 +0000 (07:17 +0200)
This change is suggested by Dhaval Giani <dhaval.giani@gmail.com>.
Polish "usage" function of cgset tool. Remove a level of indentation.
Use tabulators instead of spaces.
Based on Jan's comment change typo display->set in -g description

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Acked-by: Jan Safranek <jsafrane@redhat.com>
src/tools/cgset.c

index 614477e30cf6fee20779e9ad956b030786da6546..ea9f90d3eaec478529e8345c6570e56b2463100b 100644 (file)
@@ -57,21 +57,20 @@ scgroup_err:
 
 static void usage(int status, const char *program_name)
 {
-       if (status != 0)
+       if (status != 0) {
                fprintf(stderr, "Wrong input parameters,"
                        " try %s --help' for more information.\n",
                        program_name);
-       else {
-               printf("Usage: %s [-r <name=value>]  <cgroup_path> ...\n"
-                       "   or: %s --copy-from <source_cgroup_path> "
-                           "<cgroup_path> ...\n",
-                       program_name, program_name);
-               printf("Set the parameters of given cgroup(s)\n");
-               printf("  -r, --variable <name>                 "\
-                       "Define parameter to display\n");
-               printf("  --copy-from <source_cgroup_path>      "\
-                       "Control group whose parameters will be copied\n");
+               return;
        }
+       printf("Usage: %s [-r <name=value>] <cgroup_path> ...\n"
+               "   or: %s --copy-from <source_cgroup_path> "\
+               "<cgroup_path> ...\n", program_name, program_name);
+       printf("Set the parameters of given cgroup(s)\n");
+       printf("  -r, --variable <name>                 Define parameter "\
+               "to set\n");
+       printf("  --copy-from <source_cgroup_path>      Control group whose "\
+               "parameters will be copied\n");
 }
 
 int main(int argc, char *argv[])