[systemd-commits] src/cgls.c
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Mar 15 10:43:54 PDT 2011
src/cgls.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit b9a8e638ed520bc9b528a1e8539ca4b9026861b4
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Mar 15 18:43:47 2011 +0100
cgls: don't strip user processes and kernel threads from default output
diff --git a/src/cgls.c b/src/cgls.c
index 6f08301..2bde743 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);
More information about the systemd-commits
mailing list