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

@ -251,8 +251,8 @@ impl CpuScaling1 {
#[interface(name = "com.steampowered.SteamOSManager1.FactoryReset1")]
impl FactoryReset1 {
async fn prepare_factory_reset(&self) -> fdo::Result<u32> {
method!(self, "PrepareFactoryReset")
async fn prepare_factory_reset(&self, flags: u32) -> fdo::Result<u32> {
method!(self, "PrepareFactoryReset", flags)
}
}
@ -661,7 +661,7 @@ mod test {
use crate::hardware::test::fake_model;
use crate::hardware::HardwareVariant;
use crate::platform::{
PlatformConfig, RangeConfig, ScriptConfig, ServiceConfig, StorageConfig,
PlatformConfig, RangeConfig, ResetConfig, ScriptConfig, ServiceConfig, StorageConfig,
};
use crate::systemd::test::{MockManager, MockUnit};
use crate::{power, testing};
@ -678,7 +678,7 @@ mod test {
fn all_config() -> Option<PlatformConfig> {
Some(PlatformConfig {
factory_reset: Some(ScriptConfig::default()),
factory_reset: Some(ResetConfig::default()),
update_bios: Some(ScriptConfig::default()),
update_dock: Some(ScriptConfig::default()),
storage: Some(StorageConfig::default()),