diff --git a/local/recipes/system/thermald/source/src/main.rs b/local/recipes/system/thermald/source/src/main.rs index 0b9791175f..f8808fbecc 100644 --- a/local/recipes/system/thermald/source/src/main.rs +++ b/local/recipes/system/thermald/source/src/main.rs @@ -531,24 +531,11 @@ fn update_policy(shared: &Arc>) { } fn monitor_loop(shared: Arc>) -> ! { - let mut warned_missing_surface = false; - + // The surface-existence check happens once at startup in + // discover_zone_dirs. Re-checking it every poll iteration is + // redundant: if it vanished, the next update_policy call will + // see the empty state and re-render the TUI accordingly. loop { - // is_dir() / exists() use stat/lstat which return errors on - // Redox schemes; read_dir is the only reliable existence probe. - let surface_available = fs::read_dir(ACPI_THERMAL_ROOT).is_ok(); - if !surface_available { - if !warned_missing_surface { - warn!( - "{} is unavailable; thermald will keep polling and serve an empty thermal surface", - ACPI_THERMAL_ROOT, - ); - warned_missing_surface = true; - } - } else { - warned_missing_surface = false; - } - update_policy(&shared); thread::sleep(THERMAL_POLL_INTERVAL); }