From ce90689ba36f13cdd0fde413f1230f349166b245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 12 Sep 2024 20:55:28 +0800 Subject: [PATCH] CPU (FreeBSD): fix invalid CPU temperature Ref: #1260 --- src/detection/temps/temps_bsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detection/temps/temps_bsd.c b/src/detection/temps/temps_bsd.c index 2355ac8bf..d3160775f 100644 --- a/src/detection/temps/temps_bsd.c +++ b/src/detection/temps/temps_bsd.c @@ -7,8 +7,8 @@ const char* ffDetectCpuTemp(double* current) if (temp == -999999) return "ffSysctlGetInt(\"dev.cpu.0.temperature\") failed"; - // In tenth of degrees Celsius - *current = (double) temp / 10; + // In tenth of degrees Kelvin + *current = (double) temp / 10 - 273.15; return NULL; }