mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-13 09:52:00 -04:00
hardware: Fix style
This commit is contained in:
parent
8ae6c98554
commit
aaaf8b8bc4
1 changed files with 11 additions and 11 deletions
|
@ -80,6 +80,17 @@ pub async fn variant() -> Result<HardwareVariant> {
|
||||||
HardwareVariant::from_str(board_name.trim_end())
|
HardwareVariant::from_str(board_name.trim_end())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn check_support() -> Result<HardwareCurrentlySupported> {
|
||||||
|
// Run jupiter-check-support note this script does exit 1 for "Support: No" case
|
||||||
|
// so no need to parse output, etc.
|
||||||
|
let res = script_exit_code("/usr/bin/jupiter-check-support", &[] as &[String; 0]).await?;
|
||||||
|
|
||||||
|
Ok(match res {
|
||||||
|
0 => HardwareCurrentlySupported::Supported,
|
||||||
|
_ => HardwareCurrentlySupported::Unsupported,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
@ -119,14 +130,3 @@ mod test {
|
||||||
assert_eq!(variant().await.unwrap(), HardwareVariant::Unknown);
|
assert_eq!(variant().await.unwrap(), HardwareVariant::Unknown);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn check_support() -> Result<HardwareCurrentlySupported> {
|
|
||||||
// Run jupiter-check-support note this script does exit 1 for "Support: No" case
|
|
||||||
// so no need to parse output, etc.
|
|
||||||
let res = script_exit_code("/usr/bin/jupiter-check-support", &[] as &[String; 0]).await?;
|
|
||||||
|
|
||||||
Ok(match res {
|
|
||||||
0 => HardwareCurrentlySupported::Supported,
|
|
||||||
_ => HardwareCurrentlySupported::Unsupported,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue