Add steamos-reset-tool usage.

Instead of using steamos-factory-reset-config which resets both
the OS and the user home partitions use steamos-reset-tool which
has arguments for each or resetting both.
This commit is contained in:
Jeremy Whiting 2024-09-20 12:20:21 -06:00
parent c62b244d24
commit f7bfdd7d7a
8 changed files with 140 additions and 31 deletions

View file

@ -68,6 +68,15 @@ impl fmt::Display for HardwareCurrentlySupported {
}
}
#[derive(Display, EnumString, PartialEq, Debug, Copy, Clone, TryFromPrimitive)]
#[strum(ascii_case_insensitive)]
#[repr(u32)]
pub enum FactoryResetKind {
User = 1,
OS = 2,
All = 3,
}
pub(crate) async fn variant() -> Result<HardwareVariant> {
let board_vendor = fs::read_to_string(path(BOARD_VENDOR_PATH)).await?;
if board_vendor.trim_end() != "Valve" {