1
Fork 0
mirror of https://github.com/RGBCube/superfreq synced 2025-07-27 17:07:44 +00:00

cpu: set_ep{p,b} actually sets the attributes now

This commit is contained in:
RGBCube 2025-05-22 17:42:33 +03:00
parent 99feb831a8
commit 07ca582760
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M

View file

@ -387,10 +387,14 @@ impl Cpu {
)
.with_context(|| {
format!("this probably means that {self} doesn't exist or doesn't support changing EPP")
})
})?;
self.epp = Some(epp.to_owned());
Ok(())
}
pub fn set_epb(&self, epb: &str) -> anyhow::Result<()> {
pub fn set_epb(&mut self, epb: &str) -> anyhow::Result<()> {
let Self {
number,
available_epbs: ref epbs,
@ -410,7 +414,11 @@ impl Cpu {
)
.with_context(|| {
format!("this probably means that {self} doesn't exist or doesn't support changing EPB")
})
})?;
self.epb = Some(epb.to_owned());
Ok(())
}
pub fn set_frequency_mhz_minimum(&mut self, frequency_mhz: u64) -> anyhow::Result<()> {