From 3992d85eb62628078ea5fd869f225e31f8569053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 18 Jan 2024 15:16:46 +0800 Subject: [PATCH] CPU (Linux): show vendor if no model name available --- src/detection/cpu/cpu_linux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/detection/cpu/cpu_linux.c b/src/detection/cpu/cpu_linux.c index 227af12bb..fbc5a9749 100644 --- a/src/detection/cpu/cpu_linux.c +++ b/src/detection/cpu/cpu_linux.c @@ -209,7 +209,10 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) if (*pstart == '-') { - ffStrbufAppendS(&cpu->name, "Unknown"); + if (cpu->vendor.length > 0) + ffStrbufAppend(&cpu->name, &cpu->vendor); + else + ffStrbufAppendS(&cpu->name, "Unknown"); ++pstart; continue; }