mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-05 06:00:30 -04:00
manager: Expose new CaptureDebugTraceOutput method
This commit is contained in:
parent
a2af4d1bc5
commit
7b7afffc46
8 changed files with 126 additions and 11 deletions
|
@ -29,8 +29,8 @@ use crate::power::{
|
|||
};
|
||||
use crate::process::{run_script, script_output};
|
||||
use crate::wifi::{
|
||||
set_wifi_backend, set_wifi_debug_mode, set_wifi_power_management_state, WifiBackend,
|
||||
WifiDebugMode, WifiPowerManagement,
|
||||
extract_wifi_trace, set_wifi_backend, set_wifi_debug_mode, set_wifi_power_management_state,
|
||||
WifiBackend, WifiDebugMode, WifiPowerManagement,
|
||||
};
|
||||
use crate::{path, API_VERSION};
|
||||
|
||||
|
@ -369,6 +369,16 @@ impl SteamOSManager {
|
|||
.map_err(to_zbus_fdo_error)
|
||||
}
|
||||
|
||||
async fn capture_debug_trace_output(&self) -> fdo::Result<String> {
|
||||
Ok(extract_wifi_trace()
|
||||
.await
|
||||
.inspect_err(|message| error!("Error capturing trace output: {message}"))
|
||||
.map_err(to_zbus_fdo_error)?
|
||||
.into_os_string()
|
||||
.to_string_lossy()
|
||||
.into())
|
||||
}
|
||||
|
||||
#[zbus(property)]
|
||||
async fn inhibit_ds(&self) -> fdo::Result<bool> {
|
||||
let (tx, rx) = oneshot::channel();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue