if sched_ext can't be read
This commit is contained in:
parent
be39a2a6e5
commit
26758af7d7
@ -153,8 +153,11 @@ fn get_running_kernel_info() -> RunningKernelInfo {
|
||||
fn get_current_scheduler(version: String) -> String {
|
||||
if Path::new("/sys/kernel/sched_ext/root/ops").exists() {
|
||||
println!("sched_ext is detected, getting scx scheduler");
|
||||
let scx_sched = "sched_ext: ".to_string() + fs::read_to_string("/sys/kernel/sched_ext/root/ops").unwrap().as_str();
|
||||
scx_sched
|
||||
let scx_sched = match fs::read_to_string("/sys/kernel/sched_ext/root/ops") {
|
||||
Ok(t) => t,
|
||||
Err(_) => "unknown!".to_string()
|
||||
};
|
||||
"sched_ext: ".to_owned() + &scx_sched
|
||||
} else if bore_check() {
|
||||
"BORE".to_string()
|
||||
} else if Version::from(&version) >= Version::from("6.6") {
|
||||
|
Loading…
Reference in New Issue
Block a user