unified_cache = CGROUP_UNIFIED_SYSTEMD;
unified_systemd_v232 = false;
} else {
- if (statfs("/sys/fs/cgroup/systemd/", &fs) < 0)
+ if (statfs("/sys/fs/cgroup/systemd/", &fs) < 0) {
+ if (errno == ENOENT) {
+ /* Some other software may have set up /sys/fs/cgroup in a configuration we do not recognize. */
+ log_debug_errno(errno, "Unsupported cgroupsv1 setup detected: name=systemd hierarchy not found.");
+ return -ENOMEDIUM;
+ }
return log_debug_errno(errno, "statfs(\"/sys/fs/cgroup/systemd\" failed: %m");
+ }
if (F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) {
log_debug("Found cgroup2 on /sys/fs/cgroup/systemd, unified hierarchy for systemd controller (v232 variant)");