chiark / gitweb /
Prep v233: Add missing updates from upstream in src/basic
[elogind.git] / src / basic / cgroup-util.c
index 40e09d6f90605741351531363fe6a208ec3adae9..b5b669c0e3d7ed51cf690208c3ae9b6f811aa2e6 100644 (file)
@@ -2483,7 +2483,6 @@ int cg_all_unified(void) {
         return unified_cache >= CGROUP_UNIFIED_ALL;
 }
 
-#if 0 /// UNNEEDED by elogind
 int cg_hybrid_unified(void) {
         int r;
 
@@ -2500,6 +2499,7 @@ int cg_unified_flush(void) {
         return cg_unified_update();
 }
 
+#if 0 /// UNNEEDED by elogind
 int cg_enable_everywhere(CGroupMask supported, CGroupMask mask, const char *p) {
         _cleanup_free_ char *fs = NULL;
         CGroupController c;
@@ -2605,19 +2605,14 @@ bool cg_is_hybrid_wanted(void) {
          * Since checking is expensive, cache a non-error result. */
         r = proc_cmdline_get_bool("systemd.legacy_systemd_cgroup_controller", &b);
 
-#else
-bool cg_is_legacy_wanted(void) {
-        return true;
         /* The meaning of the kernel option is reversed wrt. to the return value
          * of this function, hence the negation. */
-        return (wanted = r > 0 ? !b : false);
-        return (wanted = r > 0 ? b : false);
-}
-
-bool cg_is_legacy_systemd_controller_wanted(void) {
-        return cg_is_legacy_wanted() && !cg_is_unified_systemd_controller_wanted();
         return (wanted = r > 0 ? !b : is_default);
 }
+#else
+bool cg_is_legacy_wanted(void) {
+        return true;
+}
 #endif // 0
 
 #if 0 /// UNNEEDED by elogind