From fc34718ae845656e314254e1911dcff7b8d14788 Mon Sep 17 00:00:00 2001 From: vasilito Date: Tue, 7 Jul 2026 21:10:33 +0300 Subject: [PATCH] redbear-power: update stale docstrings for Redox process control and MSR temperature fallback --- .../system/redbear-power/source/src/process.rs | 7 ++++--- .../system/redbear-power/source/src/sensor.rs | 14 +++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/local/recipes/system/redbear-power/source/src/process.rs b/local/recipes/system/redbear-power/source/src/process.rs index db8305176e..b29a575db5 100644 --- a/local/recipes/system/redbear-power/source/src/process.rs +++ b/local/recipes/system/redbear-power/source/src/process.rs @@ -11,9 +11,10 @@ //! (truncated to 15 chars + newline) — used as a fallback if the //! parens-parsing fails. //! -//! On Redox, no equivalent scheme exists yet, so `read()` returns an -//! empty `ProcInfo` and the render layer shows -//! `(no processes detected)`. +//! Process-management mutations (`kill`, `set_nice`, `set_affinity`) are +//! implemented on Linux via `libc` and on Redox via `libredox` and the +//! `/scheme/proc` proc scheme. Process enumeration still relies on +//! `/proc/[pid]/stat`, which is available on both platforms. use std::fs; diff --git a/local/recipes/system/redbear-power/source/src/sensor.rs b/local/recipes/system/redbear-power/source/src/sensor.rs index d3446a7428..1c45f208b9 100644 --- a/local/recipes/system/redbear-power/source/src/sensor.rs +++ b/local/recipes/system/redbear-power/source/src/sensor.rs @@ -1,7 +1,7 @@ -//! Hardware sensor readings via `sysfs` (`/sys/class/hwmon/hwmonN/*`). +//! Hardware sensor readings. //! -//! Linux exposes hardware monitoring chips via the `hwmon` class. Each -//! chip (CPU temp sensor, NVMe controller, RAM SPD, NIC PHY, etc.) +//! On Linux the primary source is `sysfs` (`/sys/class/hwmon/hwmonN/*`). +//! Each chip (CPU temp sensor, NVMe controller, RAM SPD, NIC PHY, etc.) //! gets its own directory at `/sys/class/hwmon/hwmonN/`. Inside: //! - `name` — chip identifier (k10temp, coretemp, nvme, etc.) //! - `temp*_input` — temperature in milli-Celsius (divide by 1000 for °C) @@ -11,10 +11,10 @@ //! - `curr*_input` — current in milli-Amps //! - `*_label` — human-readable label for the corresponding `_input` //! -//! On Redox, no equivalent scheme exists yet, so `read_sensors()` returns -//! an empty `Vec` and the render layer shows `(no sensors detected)`. -//! Forward work: implement a `hwmon` scheme daemon in `redox-driver-sys` -//! that exposes parsed sensor data via `/scheme/hwmon//...`. +//! On Redox, the `hwmon` scheme is not yet implemented, so when the sysfs +//! path is absent the module falls back to reading the CPU package +//! temperature via the `IA32_THERM_STATUS` MSR exposed through +//! `/scheme/sys/msr/`. use std::fs; use std::path::{Path, PathBuf};