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 {
|
fn get_current_scheduler(version: String) -> String {
|
||||||
if Path::new("/sys/kernel/sched_ext/root/ops").exists() {
|
if Path::new("/sys/kernel/sched_ext/root/ops").exists() {
|
||||||
println!("sched_ext is detected, getting scx scheduler");
|
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();
|
let scx_sched = match fs::read_to_string("/sys/kernel/sched_ext/root/ops") {
|
||||||
scx_sched
|
Ok(t) => t,
|
||||||
|
Err(_) => "unknown!".to_string()
|
||||||
|
};
|
||||||
|
"sched_ext: ".to_owned() + &scx_sched
|
||||||
} else if bore_check() {
|
} else if bore_check() {
|
||||||
"BORE".to_string()
|
"BORE".to_string()
|
||||||
} else if Version::from(&version) >= Version::from("6.6") {
|
} else if Version::from(&version) >= Version::from("6.6") {
|
||||||
|
Loading…
Reference in New Issue
Block a user