cgroup-util: drop is_cgroup_fs()
No need to bother with any cgroup v1 stuff anymore.
This commit is contained in:
@@ -2316,20 +2316,6 @@ static const char* const cgroup_io_limit_type_table[_CGROUP_IO_LIMIT_TYPE_MAX] =
|
||||
|
||||
DEFINE_STRING_TABLE_LOOKUP(cgroup_io_limit_type, CGroupIOLimitType);
|
||||
|
||||
bool is_cgroup_fs(const struct statfs *s) {
|
||||
return is_fs_type(s, CGROUP_SUPER_MAGIC) ||
|
||||
is_fs_type(s, CGROUP2_SUPER_MAGIC);
|
||||
}
|
||||
|
||||
bool fd_is_cgroup_fs(int fd) {
|
||||
struct statfs s;
|
||||
|
||||
if (fstatfs(fd, &s) < 0)
|
||||
return -errno;
|
||||
|
||||
return is_cgroup_fs(&s);
|
||||
}
|
||||
|
||||
static const char *const cgroup_controller_table[_CGROUP_CONTROLLER_MAX] = {
|
||||
[CGROUP_CONTROLLER_CPU] = "cpu",
|
||||
[CGROUP_CONTROLLER_CPUACCT] = "cpuacct",
|
||||
|
||||
@@ -329,9 +329,6 @@ static inline int cg_unified(void) {
|
||||
const char* cgroup_controller_to_string(CGroupController c) _const_;
|
||||
CGroupController cgroup_controller_from_string(const char *s) _pure_;
|
||||
|
||||
bool is_cgroup_fs(const struct statfs *s);
|
||||
bool fd_is_cgroup_fs(int fd);
|
||||
|
||||
typedef enum ManagedOOMMode {
|
||||
MANAGED_OOM_AUTO,
|
||||
MANAGED_OOM_KILL,
|
||||
|
||||
Reference in New Issue
Block a user