From 14584d0540efc42268745fc1d5f2e1ee4fd250b7 Mon Sep 17 00:00:00 2001 From: Jeremy Whiting Date: Mon, 9 Oct 2023 12:56:22 -0600 Subject: [PATCH] Add format sdcard, update bios/dock, trim devices scripts. For each of those use the respective polkit-helper script for forward compatibility in case those change. --- src/manager.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/manager.rs b/src/manager.rs index a92c547..fcfc331 100644 --- a/src/manager.rs +++ b/src/manager.rs @@ -108,6 +108,31 @@ impl SMManager { value } + async fn update_bios(&self) -> bool { + // Update the bios as needed + // Return true if the script was successful (though that might mean no update was needed), false otherwise + run_script("update bios", "/usr/bin/steamos-potlkit-helpers/jupiter-biosupdate", &["--auto"]).await + } + + async fn update_dock(&self) -> bool { + // Update the dock firmware as needed + // Retur true if successful, false otherwise + run_script("update dock firmware", "/usr/bin/steamos-polkit-helpers/jupiter-dock-updater", &[""]).await + } + + async fn trim_devices(&self) -> bool { + // Run steamos-trim-devices script + // return true on success, false otherwise + run_script("trim devices", "/usr/bin/steamos-polkit-helpers/steamos-trim-devices", &[""]).await + } + + async fn format_sdcard(&self) -> bool { + // Run steamos-format-sdcard script + // return true on success, false otherwise + run_script("format sdcard", "/usr/bin/steamos-polkit-helpers/steamos-format-sdcard", &[""]).await + } + + /// A version property. #[dbus_interface(property)] async fn version(&self) -> u32 {