Commit 241019b6 authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

cg: don't save cgroup directories twice

The path in cc->path here always has a "/" prefix since it comes from
/proc/$pid/cgroup. The additional / confuses the string slinging because ftw()
normalizes paths to have one "/" when we start traversing a subdirectory.
Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ebfc37b0
...@@ -385,7 +385,7 @@ static int collect_cgroups(struct list_head *ctls) ...@@ -385,7 +385,7 @@ static int collect_cgroups(struct list_head *ctls)
strcpy(mount_point, prefix); strcpy(mount_point, prefix);
} }
snprintf(path, PATH_MAX, "%s/%s", mount_point, cc->path); snprintf(path, PATH_MAX, "%s%s", mount_point, cc->path);
current_controller = NULL; current_controller = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment