Skip to content

Commit 1e32a95

Browse files
CPU (NetBSD): properly support PowerPC (#1802)
Some devices store their CPU name in hw.model, so check that as well before giving up. Tested on NetBSD 10.1 evbppc/wii, and allows it to detect the CPU as "750 (Revision 2.0)". --------- Co-authored-by: Carter Li <[email protected]>
1 parent 9e959bc commit 1e32a95

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/detection/cpu/cpu_nbsd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
5151
{
5252
if (ffSysctlGetString("machdep.cpu_brand", &cpu->name) != NULL &&
5353
ffSysctlGetString("machdep.dmi.processor-version", &cpu->name) != NULL &&
54-
ffSysctlGetString("hw.cpu0.name", &cpu->name) != NULL)
54+
ffSysctlGetString("hw.cpu0.name", &cpu->name) != NULL &&
55+
ffSysctlGetString("hw.model", &cpu->name) != NULL)
5556
{
5657
ffStrbufSetS(&cpu->name, "Unknown CPU");
5758
}

0 commit comments

Comments
 (0)