mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-12 01:12:30 -04:00
wifidebug: Add GetWifiDebugMode to get the current wifi debug mode.
This may be useful in cases where SetWifiDebugMode has failed to check what the current state/setting is. Though if SetWifiDebugMode has failed we may be in weird state so logs of steamos-manager should be checked to see what failed. Signed-off-by: Jeremy Whiting <jpwhiting@kde.org>
This commit is contained in:
parent
ec819e6d00
commit
ce95a53ee8
2 changed files with 16 additions and 1 deletions
|
@ -195,6 +195,16 @@
|
|||
<arg type="u" name="buffer_size" direction="in"/>
|
||||
</method>
|
||||
|
||||
<!--
|
||||
GetWifiDebugMode:
|
||||
@mode: 0 for off, 1 for on. Uses an integer for fleximility.
|
||||
|
||||
Get method for SetWifiDebugMode.
|
||||
-->
|
||||
<method name="GetWifiDebugMode">
|
||||
<arg type="u" name="mode" direction="out"/>
|
||||
</method>
|
||||
|
||||
</interface>
|
||||
|
||||
</node>
|
||||
|
|
|
@ -28,7 +28,7 @@ use tokio::{fs::File, io::AsyncWriteExt, process::Command};
|
|||
use zbus::zvariant::OwnedFd;
|
||||
use zbus_macros::dbus_interface;
|
||||
|
||||
#[derive(PartialEq, Debug)]
|
||||
#[derive(PartialEq, Debug, Copy, Clone)]
|
||||
#[repr(u32)]
|
||||
enum WifiDebugMode {
|
||||
Off,
|
||||
|
@ -498,6 +498,11 @@ impl SMManager {
|
|||
}
|
||||
}
|
||||
|
||||
async fn get_wifi_debug_mode(&mut self) -> u32 {
|
||||
// Get the wifi debug mode
|
||||
self.wifi_debug_mode as u32
|
||||
}
|
||||
|
||||
async fn set_wifi_debug_mode(&mut self, mode: u32, buffer_size: u32) -> bool {
|
||||
// Set the wifi debug mode to mode, using an int for flexibility going forward but only
|
||||
// doing things on 0 or 1 for now
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue