From f620dc18541005504e36ebdecba79e9a5b0b58df Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Sat, 2 Dec 2023 13:33:55 -0500 Subject: [PATCH] Add extra debug information for system, add root flag --- backend-rs/src/sys.rs | 12 ++++++++---- plugin.json | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/backend-rs/src/sys.rs b/backend-rs/src/sys.rs index 85706d2..2ec4577 100644 --- a/backend-rs/src/sys.rs +++ b/backend-rs/src/sys.rs @@ -54,11 +54,13 @@ pub fn find_hwmon>(path: P) -> HwMonPath { syspath.hwmon_by_index(HWMON_INDEX) }, Ok(mut iter) => { - iter.next() + let entity = iter.next() .unwrap_or_else(|| { log::error!("sysfs hwmon iter empty: [no capable results]"); syspath.hwmon_by_index(HWMON_INDEX) - }) + }); + log::info!("Found fan hwmon {}", entity.as_ref().display()); + entity } } } @@ -73,11 +75,13 @@ pub fn find_thermal_zone>(path: P) -> BasicEntityPath BasicEntityPath::new("/sys/class/thermal/thermal_zone0") }, Ok(mut iter) => { - iter.next() + let entity = iter.next() .unwrap_or_else(|| { log::error!("sysfs thermal class iter empty: [no capable results]"); BasicEntityPath::new("/sys/class/thermal/thermal_zone0") - }) + }); + log::info!("Found thermal zone {}", entity.as_ref().display()); + entity } } } diff --git a/plugin.json b/plugin.json index 75c14ab..5c31558 100644 --- a/plugin.json +++ b/plugin.json @@ -5,7 +5,7 @@ "publish": { "discord_id": "106537989684887552", "description": "Fan controls", - "tags": [ "utility", "fan-control" ], + "tags": [ "utility", "fan-control", "root" ], "image": "https://raw.githubusercontent.com/NGnius/Fantastic/main/assets/thumbnail.png" } }