From 1e32a95f83ad0ec1037edb71a2fe86b7a975821a Mon Sep 17 00:00:00 2001 From: Techflash <72118300+techflashYT@users.noreply.github.com> Date: Tue, 10 Jun 2025 22:15:40 -0700 Subject: [PATCH] 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 --- src/detection/cpu/cpu_nbsd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/detection/cpu/cpu_nbsd.c b/src/detection/cpu/cpu_nbsd.c index 0486e213c..1bac531f7 100644 --- a/src/detection/cpu/cpu_nbsd.c +++ b/src/detection/cpu/cpu_nbsd.c @@ -51,7 +51,8 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) { if (ffSysctlGetString("machdep.cpu_brand", &cpu->name) != NULL && ffSysctlGetString("machdep.dmi.processor-version", &cpu->name) != NULL && - ffSysctlGetString("hw.cpu0.name", &cpu->name) != NULL) + ffSysctlGetString("hw.cpu0.name", &cpu->name) != NULL && + ffSysctlGetString("hw.model", &cpu->name) != NULL) { ffStrbufSetS(&cpu->name, "Unknown CPU"); }