summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-02-24 18:05:31 +0100
committerLennart Poettering <lennart@poettering.net>2017-02-24 18:05:31 +0100
commit4bb652ac2fe25d4c85072c9f2f610319ac9981ee (patch)
tree7a0e461d5e06086b59f1b1eff05f7047a0cce82f /src
parent1fcca10eb364f45eb96ea46f8447a9bd41f3d623 (diff)
cgroup: rework cg_all_unified()
Let's just check the unified level, directly. There's really no value in wrapping cg_unified_controllers() with this, i.e. potentially do string comparison when there's no reason to. Also, this makes the clal more alike cg_hybrid_unified().
Diffstat (limited to 'src')
-rw-r--r--src/basic/cgroup-util.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index c20a00a07a..bda5c555ad 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -2409,7 +2409,13 @@ int cg_unified_controller(const char *controller) {
}
int cg_all_unified(void) {
- return cg_unified_controller(NULL);
+ int r;
+
+ r = cg_unified_update();
+ if (r < 0)
+ return r;
+
+ return unified_cache >= CGROUP_UNIFIED_ALL;
}
int cg_hybrid_unified(void) {