From 4efbc72a79eb243bb57837c9e80253f7d5b16b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Tue, 18 Jun 2024 14:53:14 +0900 Subject: =?UTF-8?q?Linux:=20Devuan=E3=81=A7=E3=80=8Cbios=5Flimit=E3=80=8D?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=8C=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E3=81=97=E3=81=AA=E3=81=84=E3=82=89=E3=81=97=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cpu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cpu.c b/src/cpu.c index 11eebc9..c6c7a6b 100644 --- a/src/cpu.c +++ b/src/cpu.c @@ -42,6 +42,10 @@ void display_cpu() { long int val; double fmt; FILE *fp = fopen("/sys/devices/system/cpu/cpu0/cpufreq/bios_limit", "r"); + if (fp == NULL) { + fp = fopen("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq", "r"); + } + if (fp == NULL) { perror("失敗"); return; -- cgit v1.2.3