Fetch freq from cpuid, instead of asking Linux (using /proc). This finally removes udev dependency. However, the support of cpuid 0x16 is limited, so this may break cpufetch on some systems

This commit is contained in:
Dr-Noob
2020-06-20 13:24:50 +02:00
parent 04a2fef2a2
commit b81d611282
9 changed files with 111 additions and 156 deletions

View File

@@ -67,7 +67,7 @@ struct ascii* set_ascii(VENDOR cpuVendor, STYLE style) {
/*** Check that number of lines of ascii art matches the number
of spaces plus the number of lines filled with text ***/
if(LINES_SPACE_UP+LINES_SPACE_DOWN+ATTRIBUTE_COUNT != NUMBER_OF_LINES) {
printError("Number of lines do not match (%d vs %d)",LINES_SPACE_UP+LINES_SPACE_DOWN+ATTRIBUTE_COUNT,NUMBER_OF_LINES);
printBug("Number of lines do not match (%d vs %d)",LINES_SPACE_UP+LINES_SPACE_DOWN+ATTRIBUTE_COUNT,NUMBER_OF_LINES);
return NULL;
}
@@ -86,7 +86,7 @@ struct ascii* set_ascii(VENDOR cpuVendor, STYLE style) {
strcpy(art->color2,COL_INTEL_DARK_2);
break;
default:
printError("Found invalid style (%d)",style);
printBug("Found invalid style (%d)",style);
return NULL;
}
@@ -125,7 +125,7 @@ struct ascii* set_ascii(VENDOR cpuVendor, STYLE style) {
strcpy(art->color2,COL_AMD_DARK_2);
break;
default:
printError("Found invalid style (%d)",style);
printBug("Found invalid style (%d)",style);
return NULL;
}