mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
fix: support FreezerController in cgroups v2
Fixes #60 Signed-off-by: Martin Jeřábek <martin.jerabek01@gmail.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user