Update src/uu/lscpu/src/sysfs.rs
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
parent
3180b89522
commit
748bbf845e
@ -184,10 +184,9 @@ fn read_cpu_caches(cpu_index: usize) -> Vec<CpuCache> {
|
||||
}
|
||||
|
||||
pub fn read_freq_boost_state() -> Option<bool> {
|
||||
match fs::read_to_string("/sys/devices/system/cpu/cpufreq/boost") {
|
||||
Ok(content) => Some(content.trim() == "1"),
|
||||
Err(_) => None,
|
||||
}
|
||||
fs::read_to_string("/sys/devices/system/cpu/cpufreq/boost")
|
||||
.map(|content| content.trim() == "1")
|
||||
.ok()
|
||||
}
|
||||
|
||||
pub fn read_cpu_vulnerabilities() -> Vec<CpuVulnerability> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user