mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.98][PPC] Dont display name (it was always unknown anyway)
This commit is contained in:
@@ -32,11 +32,13 @@ int64_t get_freq(struct frequency* freq) {
|
|||||||
return freq->max;
|
return freq->max;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ARCH_X86) || defined(ARCH_PPC)
|
#ifdef ARCH_X86
|
||||||
char* get_str_cpu_name(struct cpuInfo* cpu) {
|
char* get_str_cpu_name(struct cpuInfo* cpu) {
|
||||||
return cpu->cpu_name;
|
return cpu->cpu_name;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(ARCH_X86) || defined(ARCH_PPC)
|
||||||
char* get_str_sockets(struct topology* topo) {
|
char* get_str_sockets(struct topology* topo) {
|
||||||
char* string = malloc(sizeof(char) * 2);
|
char* string = malloc(sizeof(char) * 2);
|
||||||
int32_t sanity_ret = snprintf(string, 2, "%d", topo->sockets);
|
int32_t sanity_ret = snprintf(string, 2, "%d", topo->sockets);
|
||||||
|
|||||||
@@ -116,11 +116,6 @@ struct cpuInfo {
|
|||||||
struct topology* topo;
|
struct topology* topo;
|
||||||
struct features* feat;
|
struct features* feat;
|
||||||
|
|
||||||
#ifdef ARCH_PPC
|
|
||||||
// CPU name from model
|
|
||||||
char* cpu_name;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ARCH_X86
|
#ifdef ARCH_X86
|
||||||
// CPU name from model
|
// CPU name from model
|
||||||
char* cpu_name;
|
char* cpu_name;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#define COLOR_RESET "\x1b[m"
|
#define COLOR_RESET "\x1b[m"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
#if defined(ARCH_X86) || defined(ARCH_PPC)
|
#if defined(ARCH_X86)
|
||||||
ATTRIBUTE_NAME,
|
ATTRIBUTE_NAME,
|
||||||
#elif ARCH_ARM
|
#elif ARCH_ARM
|
||||||
ATTRIBUTE_SOC,
|
ATTRIBUTE_SOC,
|
||||||
@@ -77,7 +77,7 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const char* ATTRIBUTE_FIELDS [] = {
|
static const char* ATTRIBUTE_FIELDS [] = {
|
||||||
#if defined(ARCH_X86) || defined(ARCH_PPC)
|
#if defined(ARCH_X86)
|
||||||
"Name:",
|
"Name:",
|
||||||
#elif ARCH_ARM
|
#elif ARCH_ARM
|
||||||
"SoC:",
|
"SoC:",
|
||||||
@@ -575,7 +575,6 @@ bool print_cpufetch_ppc(struct cpuInfo* cpu, STYLE s, struct colors* cs) {
|
|||||||
char* max_frequency = get_str_freq(cpu->freq);
|
char* max_frequency = get_str_freq(cpu->freq);
|
||||||
char* n_cores = get_str_topology(cpu, cpu->topo, false);
|
char* n_cores = get_str_topology(cpu, cpu->topo, false);
|
||||||
char* n_cores_dual = get_str_topology(cpu, cpu->topo, true);
|
char* n_cores_dual = get_str_topology(cpu, cpu->topo, true);
|
||||||
char* cpu_name = get_str_cpu_name(cpu);
|
|
||||||
char* altivec = get_str_altivec(cpu);
|
char* altivec = get_str_altivec(cpu);
|
||||||
|
|
||||||
char* l1i = get_str_l1i(cpu->cach);
|
char* l1i = get_str_l1i(cpu->cach);
|
||||||
@@ -584,7 +583,6 @@ bool print_cpufetch_ppc(struct cpuInfo* cpu, STYLE s, struct colors* cs) {
|
|||||||
char* l3 = get_str_l3(cpu->cach);
|
char* l3 = get_str_l3(cpu->cach);
|
||||||
char* pp = get_str_peak_performance(cpu,cpu->topo,get_freq(cpu->freq));
|
char* pp = get_str_peak_performance(cpu,cpu->topo,get_freq(cpu->freq));
|
||||||
|
|
||||||
setAttribute(art,ATTRIBUTE_NAME,cpu_name);
|
|
||||||
/*
|
/*
|
||||||
if(cpu->hv->present) {
|
if(cpu->hv->present) {
|
||||||
setAttribute(art, ATTRIBUTE_HYPERVISOR, cpu->hv->hv_name);
|
setAttribute(art, ATTRIBUTE_HYPERVISOR, cpu->hv->hv_name);
|
||||||
|
|||||||
@@ -166,9 +166,6 @@ struct cpuInfo* get_cpu_info() {
|
|||||||
*ptr = false;
|
*ptr = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cpu->cpu_name = malloc(sizeof(char) * strlen(STRING_UNKNOWN) + 1);
|
|
||||||
snprintf(cpu->cpu_name, strlen(STRING_UNKNOWN) + 1, STRING_UNKNOWN);
|
|
||||||
|
|
||||||
cpu->arch = get_cpu_uarch();
|
cpu->arch = get_cpu_uarch();
|
||||||
cpu->freq = get_frequency_info();
|
cpu->freq = get_frequency_info();
|
||||||
cpu->topo = get_topology_info(cpu, cpu->cach);
|
cpu->topo = get_topology_info(cpu, cpu->cach);
|
||||||
|
|||||||
Reference in New Issue
Block a user