From e04c7cc1f821e924e082965dc68b0dcea64508f8 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 8 Feb 2026 18:09:01 +0100 Subject: [PATCH] Use the AirFlow temperature if the disk temperatur is not available --- cmdline/thermal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmdline/thermal.c b/cmdline/thermal.c index 59b07e2a..68339cb0 100644 --- a/cmdline/thermal.c +++ b/cmdline/thermal.c @@ -124,7 +124,9 @@ struct snapraid_thermal_params fit_thermal_model(const struct snapraid_thermal_p static int smart_temp(devinfo_t* devinfo) { - uint64_t t = devinfo->smart[SMART_TEMPERATURE_CELSIUS]; + uint64_t t = devinfo->smart[SMART_TEMPERATURE_CELSIUS] & 0xFFFFFFFF; + if (t == SMART_UNASSIGNED) + t = devinfo->smart[SMART_AIRFLOW_TEMPERATURE_CELSIUS] & 0xFFFFFFFF; /* validate temperature */ if (t == SMART_UNASSIGNED)