mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Merge pull request #49 from lifupan/master
freezer: fix the issue of missing trim the str
This commit is contained in:
@@ -130,7 +130,7 @@ impl FreezerController {
|
||||
let mut s = String::new();
|
||||
let res = file.read_to_string(&mut s);
|
||||
match res {
|
||||
Ok(_) => match s.as_ref() {
|
||||
Ok(_) => match s.trim() {
|
||||
"FROZEN" => Ok(FreezerState::Frozen),
|
||||
"THAWED" => Ok(FreezerState::Thawed),
|
||||
"1" => Ok(FreezerState::Frozen),
|
||||
|
||||
Reference in New Issue
Block a user