return (supported = false);
}
-bool cg_freezer_supported(void) {
- static thread_local int supported = -1;
-
- if (supported >= 0)
- return supported;
-
- if (cg_all_unified() <= 0)
- return (supported = false);
-
- if (access("/sys/fs/cgroup/init.scope/cgroup.freeze", F_OK) >= 0)
- return (supported = true);
- if (errno != ENOENT)
- log_debug_errno(errno, "Failed to check whether cgroup freezer is available, assuming not: %m");
- return (supported = false);
-}
-
bool cg_kill_supported(void) {
static thread_local int supported = -1;
int cg_mask_to_string(CGroupMask mask, char **ret);
bool cg_ns_supported(void);
-bool cg_freezer_supported(void);
bool cg_kill_supported(void);
int cg_all_unified(void);
assert(action >= 0);
assert(action < _FREEZER_ACTION_MAX);
- if (!cg_freezer_supported())
- return 0;
-
unit_next_freezer_state(u, action, &next, &objective);
CGroupRuntime *crt = unit_get_cgroup_runtime(u);
assert(u);
assert(IN_SET(action, FREEZER_FREEZE, FREEZER_THAW));
- if (!cg_freezer_supported() || !unit_can_freeze(u))
+ if (!unit_can_freeze(u))
return -EOPNOTSUPP;
if (u->job)