mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.98][Refactoring] Do not use hv_present in get_freq_from_file
This commit is contained in:
@@ -31,7 +31,7 @@ struct frequency* get_frequency_info(uint32_t core) {
|
||||
struct frequency* freq = emalloc(sizeof(struct frequency));
|
||||
|
||||
freq->base = UNKNOWN_FREQ;
|
||||
freq->max = get_max_freq_from_file(core, false);
|
||||
freq->max = get_max_freq_from_file(core);
|
||||
|
||||
return freq;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ struct cpuInfo* get_cpu_info() {
|
||||
midr_array[i] = midr_array[0];
|
||||
}
|
||||
|
||||
freq_array[i] = get_max_freq_from_file(i, false);
|
||||
freq_array[i] = get_max_freq_from_file(i);
|
||||
if(freq_array[i] == UNKNOWN_FREQ) {
|
||||
printWarn("Unable to fetch max frequency for core %d. This is probably because the core is offline", i);
|
||||
freq_array[i] = freq_array[0];
|
||||
@@ -272,7 +272,7 @@ void print_debug(struct cpuInfo* cpu) {
|
||||
|
||||
for(int i=0; i < ncores; i++) {
|
||||
printf("[Core %d] ", i);
|
||||
long freq = get_max_freq_from_file(i, false);
|
||||
long freq = get_max_freq_from_file(i);
|
||||
uint32_t midr = get_midr_from_cpuinfo(i, &success);
|
||||
if(!success) {
|
||||
printWarn("Unable to fetch MIDR for core %d. This is probably because the core is offline", i);
|
||||
@@ -283,7 +283,7 @@ void print_debug(struct cpuInfo* cpu) {
|
||||
}
|
||||
if(freq == UNKNOWN_FREQ) {
|
||||
printWarn("Unable to fetch max frequency for core %d. This is probably because the core is offline", i);
|
||||
printf("%ld MHz\n", get_max_freq_from_file(0, false));
|
||||
printf("%ld MHz\n", get_max_freq_from_file(0));
|
||||
}
|
||||
else {
|
||||
printf("%ld MHz\n", freq);
|
||||
|
||||
Reference in New Issue
Block a user