fix: support FreezerController in cgroups v2

Fixes #60

Signed-off-by: Martin Jeřábek <martin.jerabek01@gmail.com>
This commit is contained in:
Martin Jeřábek
2021-11-05 17:56:45 +01:00
parent 63750887c2
commit 4231f35a44

View File

@@ -202,7 +202,12 @@ impl Hierarchy for V2 {
let mut subs = vec![];
let controllers = ret.unwrap().trim().to_string();
let controller_list: Vec<&str> = controllers.split(' ').collect();
let mut controller_list: Vec<&str> = controllers.split(' ').collect();
// The freezer functionality is present in V2, but not as a controller,
// but apparently as a core functionality. FreezerController supports
// that, but we must explicitly fake the controller here.
controller_list.push("freezer");
for s in controller_list {
match s {