From: Lennart Poettering Date: Fri, 24 Feb 2017 17:05:31 +0000 (+0100) Subject: cgroup: rework cg_all_unified() X-Git-Tag: v233.3~33 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a1002c6e2e7933c03aa4f49bdbce31e246ab589d;p=elogind.git 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(). --- diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index ff9367e8c..40e09d6f9 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -2474,7 +2474,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; } #if 0 /// UNNEEDED by elogind