mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-12 22:40:54 +01:00
CPU (Linux): don't crash if /sys/devices/system/cpu/cpufreq/ doesn't exist
Ref: #750
This commit is contained in:
1 parent
0a6140346e
commit
4a7e60ef57
1 file changed
+2
@@ -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