1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

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().
This commit is contained in:
Lennart Poettering 2017-02-24 18:05:31 +01:00
parent 1fcca10eb3
commit 4bb652ac2f

View File

@ -2409,7 +2409,13 @@ int cg_unified_controller(const char *controller) {
} }
int cg_all_unified(void) { 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) { int cg_hybrid_unified(void) {