mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
CPU (Linux): don't crash if /sys/devices/system/cpu/cpufreq/ doesn't exist
Ref: #750
This commit is contained in:
@@ -107,6 +107,8 @@ static bool detectFrequency(FFCPUResult* cpu)
|
||||
{
|
||||
FF_STRBUF_AUTO_DESTROY path = ffStrbufCreateS("/sys/devices/system/cpu/cpufreq/");
|
||||
FF_AUTO_CLOSE_DIR DIR* dir = opendir(path.chars);
|
||||
if (!dir) return false;
|
||||
|
||||
FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate();
|
||||
uint32_t baseLen = path.length;
|
||||
bool flag = false;
|
||||
|
||||
Reference in New Issue
Block a user