summaryrefslogtreecommitdiff
path: root/src/cgls
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-10 00:36:57 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-10 17:31:31 +0100
commita6a4d3c46bd41e2f33e8eb61ac53b3c79049f167 (patch)
tree7d10b58e55f9f4a351f510d636493994f13ab38e /src/cgls
parentf499daf4b3fbd24071b9f301ef6401e258d1b1d6 (diff)
cgls: suppress output of controller name, if it's the systemd one
Diffstat (limited to 'src/cgls')
-rw-r--r--src/cgls/cgls.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c
index 4e9a76a100..a5a580438a 100644
--- a/src/cgls/cgls.c
+++ b/src/cgls/cgls.c
@@ -165,8 +165,10 @@ static int get_cgroup_root(char **ret) {
}
static void show_cg_info(const char *controller, const char *path) {
- if (cg_unified() <= 0)
+
+ if (cg_unified() <= 0 && controller && !streq(controller, SYSTEMD_CGROUP_CONTROLLER))
printf("Controller %s; ", controller);
+
printf("Control group %s:\n", isempty(path) ? "/" : path);
fflush(stdout);
}