mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 16:00:39 +01:00
[v0.97] Do not consider CPUID freq == 0 as a bug. Check udev if CPUID freq is not supported
This commit is contained in:
@@ -649,12 +649,7 @@ struct frequency* get_frequency_info(struct cpuInfo* cpu) {
|
|||||||
freq->max = get_max_freq_from_file(0, cpu->hv->present);
|
freq->max = get_max_freq_from_file(0, cpu->hv->present);
|
||||||
|
|
||||||
if(freq->max == 0) {
|
if(freq->max == 0) {
|
||||||
if(cpu->hv->present) {
|
printWarn("Read max CPU frequency from udev and got 0 MHz");
|
||||||
printWarn("Read max CPU frequency and got 0 MHz");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
printBug("Read max CPU frequency and got 0 MHz");
|
|
||||||
}
|
|
||||||
freq->max = UNKNOWN_FREQ;
|
freq->max = UNKNOWN_FREQ;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -671,22 +666,17 @@ struct frequency* get_frequency_info(struct cpuInfo* cpu) {
|
|||||||
freq->max = ebx;
|
freq->max = ebx;
|
||||||
|
|
||||||
if(freq->base == 0) {
|
if(freq->base == 0) {
|
||||||
if(cpu->hv->present) {
|
printWarn("Read base CPU frequency from CPUID and got 0 MHz");
|
||||||
printWarn("Read base CPU frequency and got 0 MHz");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
printBug("Read base CPU frequency and got 0 MHz");
|
|
||||||
}
|
|
||||||
freq->base = UNKNOWN_FREQ;
|
freq->base = UNKNOWN_FREQ;
|
||||||
}
|
}
|
||||||
if(freq->max == 0) {
|
if(freq->max == 0) {
|
||||||
if(cpu->hv->present) {
|
printWarn("Read max CPU frequency from CPUID and got 0 MHz. Using udev");
|
||||||
printWarn("Read max CPU frequency and got 0 MHz");
|
freq->max = get_max_freq_from_file(0, cpu->hv->present);
|
||||||
|
|
||||||
|
if(freq->max == 0) {
|
||||||
|
printWarn("Read max CPU frequency from udev and got 0 MHz");
|
||||||
|
freq->max = UNKNOWN_FREQ;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
printBug("Read max CPU frequency and got 0 MHz");
|
|
||||||
}
|
|
||||||
freq->max = UNKNOWN_FREQ;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user