chiark / gitweb /
Add mounting of a name=elogind cgroup if no init controller is found.
[elogind.git] / src / basic / cgroup-util.c
index c83010d8ad8945d92b70d5b936eff3ef2b14e633..1e54f58f57d0454e43f2f9592084c3b9f0f79000 100644 (file)
@@ -520,7 +520,7 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
                  * *below* the controllers, without any prefix. */
 
                 if (!path && !suffix)
-                return -EINVAL;
+                        return -EINVAL;
 
                 if (!suffix)
                         t = strdup(path);
@@ -552,7 +552,7 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
 
         path_kill_slashes(*fs);
         return 0;
-        }
+}
 
 static int controller_is_accessible(const char *controller) {
         int unified;
@@ -2274,6 +2274,10 @@ bool cg_is_unified_wanted(void) {
 bool cg_is_legacy_wanted(void) {
         return !cg_is_unified_wanted();
 }
+#else
+bool cg_is_legacy_wanted(void) {
+        return true;
+}
 #endif // 0
 
 static const char *cgroup_controller_table[_CGROUP_CONTROLLER_MAX] = {