mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Detect subsystems and get root from /proc/self/mountinfo
Delete check_support and stop detecting subsystems by finding in the root folders because the detecting method is not accurate. Signed-off-by: Tim Zhang <tim@hyper.sh>
This commit is contained in:
@@ -137,7 +137,7 @@ impl Controllers {
|
||||
Controllers::NetPrio => return "net_prio".to_string(),
|
||||
Controllers::HugeTlb => return "hugetlb".to_string(),
|
||||
Controllers::Rdma => return "rdma".to_string(),
|
||||
Controllers::Systemd => return "systemd".to_string(),
|
||||
Controllers::Systemd => return "name=systemd".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -367,12 +367,6 @@ pub trait Hierarchy {
|
||||
fn root_control_group(&self) -> Cgroup;
|
||||
|
||||
fn v2(&self) -> bool;
|
||||
|
||||
/// Checks whether a certain subsystem is supported in the hierarchy.
|
||||
///
|
||||
/// This is an internal function and should not be used.
|
||||
#[doc(hidden)]
|
||||
fn check_support(&self, sub: Controllers) -> bool;
|
||||
}
|
||||
|
||||
/// Resource limits for the memory subsystem.
|
||||
|
||||
Reference in New Issue
Block a user