mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.98][PPC] Add part number detection using linux device tree
This commit is contained in:
@@ -166,6 +166,11 @@ struct cpuInfo* get_cpu_info() {
|
||||
*ptr = false;
|
||||
}
|
||||
|
||||
int len;
|
||||
char* path = emalloc(sizeof(char) * (strlen(_PATH_DT) + strlen(_PATH_DT_PART) + 1));
|
||||
sprintf(path, "%s%s", _PATH_DT, _PATH_DT_PART);
|
||||
|
||||
cpu->cpu_name = read_file(path, &len);
|
||||
cpu->pvr = mfpvr();
|
||||
cpu->arch = get_cpu_uarch(cpu);
|
||||
cpu->freq = get_frequency_info();
|
||||
|
||||
Reference in New Issue
Block a user