diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cgls.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cgls.c b/src/cgls.c index 6f083015ed..2bde743acf 100644 --- a/src/cgls.c +++ b/src/cgls.c @@ -112,8 +112,12 @@ int main(int argc, char *argv[]) { if ((r = cg_get_by_pid(SYSTEMD_CGROUP_CONTROLLER, 1, &root)) < 0) t = "/"; - else - t = root; + else { + if (endswith(root, "/system")) + root[strlen(root)-7] = 0; + + t = root[0] ? root : "/"; + } r = show_cgroup(SYSTEMD_CGROUP_CONTROLLER, t, NULL, 0); free(root); |