When cgset fails to modify a cgroup, it output a
hardcoded error message which can cause user confusion.
This commit updates the error message to behave like
other error messages throughout libcgroup and produce
a more user-friendly output.
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Acked-by: Nikola Forró <nforro@redhat.com>
/* modify cgroup based on values of the new one */
ret = cgroup_modify_cgroup(cgroup);
if (ret) {
- fprintf(stderr, "%s: "
- "the group can't be modified\n",
- argv[0]);
+ fprintf(stderr, "%s: cgroup modify error: %s \n",
+ argv[0], cgroup_strerror(ret));
goto cgroup_free_err;
}