mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
editorconfig
This commit is contained in:
+4
-4
@@ -12,7 +12,7 @@ void ffPrintCPU(FFinstance* instance)
|
||||
ffPrintError(instance, "CPU", "\"model name%*s %[^\\n]\" not found in \"/proc/cpuinfo\"");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
FILE* frequencyFile = fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq", "r");
|
||||
if(frequencyFile == NULL)
|
||||
{
|
||||
@@ -40,14 +40,14 @@ void ffPrintCPU(FFinstance* instance)
|
||||
ffStrbufSetF(&cpu, "%s (%i) @ %.9gGHz", name, numProcs, ghz);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
ffParseFormatString(&cpu, &instance->config.cpuFormat, 3,
|
||||
(FFformatarg){FF_FORMAT_ARG_TYPE_STRING, name},
|
||||
(FFformatarg){FF_FORMAT_ARG_TYPE_INT, &numProcs},
|
||||
(FFformatarg){FF_FORMAT_ARG_TYPE_DOUBLE, &ghz}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
ffPrintAndSaveCachedValue(instance, "CPU", &cpu);
|
||||
ffStrbufDestroy(&cpu);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user