if (F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC))
unified_cache = CGROUP_UNIFIED_ALL;
+#if 0 /// The handling of cgroups is a bit different with elogind
else if (F_TYPE_EQUAL(fs.f_type, TMPFS_MAGIC)) {
+#else
+ else if (F_TYPE_EQUAL(fs.f_type, CGROUP_SUPER_MAGIC)
+ || F_TYPE_EQUAL(fs.f_type, TMPFS_MAGIC)) {
+#endif // 0
if (statfs("/sys/fs/cgroup/unified/", &fs) == 0 &&
F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) {
unified_cache = CGROUP_UNIFIED_SYSTEMD;
unified_systemd_v232 = false;
#if 0 /// elogind uses its own name
} else if (statfs("/sys/fs/cgroup/systemd/", &fs) == 0 &&
- F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) {
- unified_cache = CGROUP_UNIFIED_SYSTEMD;
- unified_systemd_v232 = true;
- } else {
- if (statfs("/sys/fs/cgroup/systemd/", &fs) < 0)
- return -errno;
#else
} else if (statfs("/sys/fs/cgroup/elogind/", &fs) == 0 &&
+#endif // 0
F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) {
unified_cache = CGROUP_UNIFIED_SYSTEMD;
unified_systemd_v232 = true;
} else {
-#endif // 0
+#if 0 /// There is no sub-grouping within elogind
+ if (statfs("/sys/fs/cgroup/systemd/", &fs) < 0)
+ return -errno;
if (!F_TYPE_EQUAL(fs.f_type, CGROUP_SUPER_MAGIC))
return -ENOMEDIUM;
+#endif // 0
unified_cache = CGROUP_UNIFIED_NONE;
}
} else