[v0.99][PPC] Fix compilation issues in ppc

This commit is contained in:
Dr-Noob
2021-08-13 09:40:31 +02:00
parent 9c552bcddf
commit 132b961b24
2 changed files with 7 additions and 3 deletions

View File

@@ -16,6 +16,8 @@
#include "../arm/uarch.h" #include "../arm/uarch.h"
#endif #endif
#define UNUSED(x) (void)(x)
#define STRING_YES "Yes" #define STRING_YES "Yes"
#define STRING_NO "No" #define STRING_NO "No"
#define STRING_NONE "None" #define STRING_NONE "None"
@@ -38,6 +40,8 @@ char* get_str_cpu_name(struct cpuInfo* cpu, bool fcpuname) {
if(!fcpuname) { if(!fcpuname) {
return get_str_cpu_name_abbreviated(cpu); return get_str_cpu_name_abbreviated(cpu);
} }
#elif ARCH_PPC
UNUSED(fcpuname);
#endif #endif
return cpu->cpu_name; return cpu->cpu_name;
} }

View File

@@ -462,7 +462,7 @@ bool print_cpufetch_x86(struct cpuInfo* cpu, STYLE s, struct color** cs, struct
#endif #endif
#ifdef ARCH_PPC #ifdef ARCH_PPC
bool print_cpufetch_ppc(struct cpuInfo* cpu, STYLE s, struct color** cs, struct terminal* term) { bool print_cpufetch_ppc(struct cpuInfo* cpu, STYLE s, struct color** cs, struct terminal* term, bool fcpuname) {
struct ascii* art = set_ascii(get_cpu_vendor(cpu), s); struct ascii* art = set_ascii(get_cpu_vendor(cpu), s);
if(art == NULL) if(art == NULL)
return false; return false;
@@ -471,7 +471,7 @@ bool print_cpufetch_ppc(struct cpuInfo* cpu, STYLE s, struct color** cs, struct
char* manufacturing_process = get_str_process(cpu); char* manufacturing_process = get_str_process(cpu);
char* sockets = get_str_sockets(cpu->topo); char* sockets = get_str_sockets(cpu->topo);
char* max_frequency = get_str_freq(cpu->freq); char* max_frequency = get_str_freq(cpu->freq);
char* cpu_name = get_str_cpu_name(cpu); char* cpu_name = get_str_cpu_name(cpu, fcpuname);
char* n_cores = get_str_topology(cpu->topo, false); char* n_cores = get_str_topology(cpu->topo, false);
char* n_cores_dual = get_str_topology(cpu->topo, true); char* n_cores_dual = get_str_topology(cpu->topo, true);
char* altivec = get_str_altivec(cpu); char* altivec = get_str_altivec(cpu);
@@ -737,7 +737,7 @@ bool print_cpufetch(struct cpuInfo* cpu, STYLE s, struct color** cs, bool show_f
#ifdef ARCH_X86 #ifdef ARCH_X86
return print_cpufetch_x86(cpu, s, cs, term, show_full_cpu_name); return print_cpufetch_x86(cpu, s, cs, term, show_full_cpu_name);
#elif ARCH_PPC #elif ARCH_PPC
return print_cpufetch_ppc(cpu, s, cs, term); return print_cpufetch_ppc(cpu, s, cs, term, show_full_cpu_name);
#elif ARCH_ARM #elif ARCH_ARM
return print_cpufetch_arm(cpu, s, cs, term); return print_cpufetch_arm(cpu, s, cs, term);
#endif #endif