From 21a98a3748b92d505d289dde94a9af6b722fbf2a Mon Sep 17 00:00:00 2001 From: Red Bear OS Date: Sun, 28 Jun 2026 18:30:47 +0300 Subject: [PATCH] acpid: handle getdents on empty Thermal and Power dirs thermald and redbear-upower read_dir /scheme/acpi/{thermal,power} to enumerate ACPI _TZ zones and _PR power sources. The acpid scheme returned EIO for these new directory variants, which std::fs::read_dir interprets as 'the path is not a directory or doesn't exist' and emits a warning. Return Ok with no entries for Thermal/Power getdents so read_dir sees an existing-but-empty directory and consumers gracefully fall through to the empty-state path. --- drivers/acpid/src/scheme.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/acpid/src/scheme.rs b/drivers/acpid/src/scheme.rs index 46f078d7ea..71100d768c 100644 --- a/drivers/acpid/src/scheme.rs +++ b/drivers/acpid/src/scheme.rs @@ -407,6 +407,13 @@ impl SchemeSync for AcpiScheme<'_, '_> { })?; } } + HandleKind::Thermal | HandleKind::Power => { + // Empty placeholder directories. Consumers (thermald, + // redbear-upower) iterate them with read_dir and gracefully + // handle the empty result. Returning Ok with no entries + // is what `read_dir` expects for an existing-but-empty + // directory. + } _ => return Err(Error::new(EIO)), }