CPU (NetBSD): trim CPU vendor

This commit is contained in:
李通洲
2024-12-21 20:23:18 +08:00
parent b38d7a4919
commit b99f54b9f4
+2 -1
View File
@@ -48,7 +48,8 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
return "sysctlbyname(machdep.cpu_brand) failed";
}
ffSysctlGetString("machdep.dmi.processor-vendor", &cpu->vendor);
if (ffSysctlGetString("machdep.dmi.processor-vendor", &cpu->vendor) == NULL)
ffStrbufTrimRightSpace(&cpu->vendor);
cpu->coresPhysical = (uint16_t) ffSysctlGetInt("hw.ncpu", 1);
cpu->coresLogical = cpu->coresPhysical;