423018f381
Fix cgclassify exit code
28 lines
858 B
Diff
28 lines
858 B
Diff
commit 1d7bbecfea73bd0b21c457c240e9049f8a5c40cc
|
|
Author: Jan Safranek <jsafrane@redhat.com>
|
|
Date: Fri Jan 7 13:29:04 2011 +0100
|
|
|
|
BUGFIX: add missing braces
|
|
|
|
Fix cgclassify to return zero exit code when it succeeds.
|
|
|
|
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
|
|
|
|
diff --git a/src/tools/cgclassify.c b/src/tools/cgclassify.c
|
|
index 3181105..fcad4b2 100644
|
|
--- a/src/tools/cgclassify.c
|
|
+++ b/src/tools/cgclassify.c
|
|
@@ -45,10 +45,11 @@ 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)
|
|
+ if (ret) {
|
|
fprintf(stderr, "Error changing group of pid %d: %s\n",
|
|
pid, cgroup_strerror(ret));
|
|
return -1;
|
|
+ }
|
|
}
|
|
|
|
return 0;
|