summaryrefslogtreecommitdiffstats
path: root/src/cgls
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-02-24 17:52:58 +0100
committerLennart Poettering <lennart@poettering.net>2017-02-24 17:52:58 +0100
commitb4cccbc13ad6f98bd8e816ce5fffb99f5be74c8c (patch)
tree14313f0bd5cd2dad79fda852663d9038f81a35ad /src/cgls
parentcgroup-util: check unified_cache before invoking streq() (diff)
downloadsystemd-b4cccbc13ad6f98bd8e816ce5fffb99f5be74c8c.tar.xz
systemd-b4cccbc13ad6f98bd8e816ce5fffb99f5be74c8c.zip
cgroup: change cg_unified() to possibly return errors again
We use our cgroup APIs in various contexts, including from our libraries sd-login, sd-bus. As we don#t control those environments we can't rely that the unified cgroup setup logic succeeds, and hence really shouldn't assert on it. This more or less reverts 415fc41ceaeada2e32639f24f134b1c248b9e43f.
Diffstat (limited to 'src/cgls')
-rw-r--r--src/cgls/cgls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c
index 40db82f9ae..1b746a0e13 100644
--- a/src/cgls/cgls.c
+++ b/src/cgls/cgls.c
@@ -158,7 +158,7 @@ static int parse_argv(int argc, char *argv[]) {
static void show_cg_info(const char *controller, const char *path) {
- if (!cg_all_unified() && controller && !streq(controller, SYSTEMD_CGROUP_CONTROLLER))
+ if (cg_all_unified() == 0 && controller && !streq(controller, SYSTEMD_CGROUP_CONTROLLER))
printf("Controller %s; ", controller);
printf("Control group %s:\n", isempty(path) ? "/" : path);