FreeBSD (CPU): fix temperature detection

This commit is contained in:
李通洲
2023-06-15 09:35:47 +08:00
parent 3c8688345f
commit a18073f5de
+1 -1
View File
@@ -16,7 +16,7 @@ const char* ffDetectCPUImpl(FF_MAYBE_UNUSED const FFinstance* instance, const FF
if (options->temp)
{
FF_STRBUF_AUTO_DESTROY cpuTemp = ffStrbufCreate();
if(ffSysctlGetString("temperature", &cpuTemp))
if(ffSysctlGetString("hw.acpi.thermal.tz0.temperature", &cpuTemp))
cpu->temperature = FF_CPU_TEMP_UNSET;
else
cpu->temperature = ffStrbufToDouble(&cpuTemp);