From 63a7085246a5b656f4f10acb430db8aa9c5a09c7 Mon Sep 17 00:00:00 2001 From: ccastiglione-reply Date: Wed, 5 Nov 2025 14:32:37 +0100 Subject: [PATCH] fix: thermal_zone, handle EINVAL errors from sysfs reads. Signed-off-by: ccastiglione-reply --- sysfs/class_thermal.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysfs/class_thermal.go b/sysfs/class_thermal.go index 71b2a98d..1448bed5 100644 --- a/sysfs/class_thermal.go +++ b/sysfs/class_thermal.go @@ -51,7 +51,8 @@ func (fs FS) ClassThermalZoneStats() ([]ClassThermalZoneStats, error) { for _, zone := range zones { zoneStats, err := parseClassThermalZone(zone) if err != nil { - if errors.Is(err, syscall.ENODATA) || errors.As(err, new(*fsp.PathError)) || errors.Is(err, syscall.EAGAIN) { + if errors.Is(err, syscall.ENODATA) || errors.As(err, new(*fsp.PathError)) || errors.Is(err, syscall.EAGAIN) || + errors.Is(err, syscall.EINVAL) { continue } return nil, err