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:
@@ -465,12 +465,8 @@ impl ControllerInternal for MemController {
|
||||
}
|
||||
|
||||
impl MemController {
|
||||
/// Contructs a new `MemController` with `oroot` serving as the root of the control group.
|
||||
pub fn new(oroot: PathBuf, v2: bool) -> Self {
|
||||
let mut root = oroot;
|
||||
if !v2 {
|
||||
root.push(Self::controller_type().to_string());
|
||||
}
|
||||
/// Contructs a new `MemController` with `root` serving as the root of the control group.
|
||||
pub fn new(root: PathBuf, v2: bool) -> Self {
|
||||
Self {
|
||||
base: root.clone(),
|
||||
path: root,
|
||||
|
||||
Reference in New Issue
Block a user