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;
}
info("Move running task(s) to given cgroups\n");
info(" -h, --help Display this help\n");
info(" -g <controllers>:<path> 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");
}
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;
}
}
/* 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;
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;
/* 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;
}