From b9a8e638ed520bc9b528a1e8539ca4b9026861b4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 15 Mar 2011 18:43:47 +0100 Subject: [PATCH] cgls: don't strip user processes and kernel threads from default output --- src/cgls.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cgls.c b/src/cgls.c index 6f083015..2bde743a 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); -- 2.39.5