X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/80fc20d1d69b14f36ad9bb64d8af38481cbf1ff5..49d1e5fae2e4957abcf0f1056b3e8df8d695094c:/components/cpu.c?ds=inline diff --git a/components/cpu.c b/components/cpu.c index b9b3924..60a7991 100644 --- a/components/cpu.c +++ b/components/cpu.c @@ -12,7 +12,7 @@ int freq; return (pscanf("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", - "%i", &freq) == 1) ? + "%d", &freq) == 1) ? bprintf("%d", (freq + 500) / 1000) : NULL; }