From: Kamalesh Babulal Date: Thu, 30 Jun 2022 08:26:34 +0000 (+0530) Subject: tools/cgclassify: increase the column width to 100 X-Git-Tag: v3.0~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa460de72b69d7dbe6561627c1dd404158655e3d;p=thirdparty%2Flibcgroup.git tools/cgclassify: increase the column width to 100 100 column width is more comfortable to read over 80 columns, lets increase it. This patch, also introduced/removes empty lines across the file, making it more readable. Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- diff --git a/src/tools/cgclassify.c b/src/tools/cgclassify.c index 9f19b830..d3d058fe 100644 --- a/src/tools/cgclassify.c +++ b/src/tools/cgclassify.c @@ -29,8 +29,7 @@ static void usage(int status, const char *program_name) { if (status != 0) { - err("Wrong input parameters, "); - err("try %s '-h' for more information.\n", program_name); + err("Wrong input parameters, try %s '-h' for more information.\n", program_name); return; } @@ -39,8 +38,7 @@ static void usage(int status, const char *program_name) info("Move running task(s) to given cgroups\n"); info(" -h, --help Display this help\n"); info(" -g : Control group to be used as target\n"); - info(" --cancel-sticky cgred daemon change pidlist "); - info("and children tasks\n"); + info(" --cancel-sticky cgred daemon change pidlist and children tasks\n"); info(" --sticky cgred daemon does not change "); info("pidlist and children tasks\n"); } @@ -60,8 +58,7 @@ static int change_group_path(pid_t pid, struct cgroup_group_spec *cgroup_list[]) ret = cgroup_change_cgroup_path(cgroup_list[i]->path, pid, (const char *const*) cgroup_list[i]->controllers); if (ret) { - err("Error changing group of pid %d: %s\n", pid, - cgroup_strerror(ret)); + err("Error changing group of pid %d: %s\n", pid, cgroup_strerror(ret)); return -1; } } @@ -94,8 +91,7 @@ static int change_group_based_on_rule(pid_t pid) /* Change the cgroup by determining the rules */ ret = cgroup_change_cgroup_flags(euid, egid, procname, pid, 0); if (ret) { - err("Error: change of cgroup failed for pid %d: %s\n", pid, - cgroup_strerror(ret)); + err("Error: change of cgroup failed for pid %d: %s\n", pid, cgroup_strerror(ret)); goto out; } ret = 0; @@ -137,11 +133,9 @@ int main(int argc, char *argv[]) exit(0); break; case 'g': - ret = parse_cgroup_spec(cgroup_list, optarg, - CG_HIER_MAX); + ret = parse_cgroup_spec(cgroup_list, optarg, CG_HIER_MAX); if (ret) { - err("cgroup controller and path parsing "); - err("failed\n"); + err("cgroup controller and path parsing failed\n"); return -1; } cg_specified = 1; @@ -162,8 +156,7 @@ int main(int argc, char *argv[]) /* Initialize libcg */ ret = cgroup_init(); if (ret) { - err("%s: libcgroup initialization failed: %s\n", argv[0], - cgroup_strerror(ret)); + err("%s: libcgroup initialization failed: %s\n", argv[0], cgroup_strerror(ret)); return ret; }