Skip to content

Commit 89e8880

Browse files
committed
fix(quickemu): read "Vendor ID" for CPU vendor detection
- Change HOST_CPU_VENDOR lookup to use '^Vendor ID' when parsing /proc/cpuinfo - Ensures correct CPU vendor detection on systems that label the field as 'Vendor ID' instead of 'Vendor' Fixes #1845 Signed-off-by: Martin Wimpress <martin@wimpress.org>
1 parent 7825f33 commit 89e8880

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quickemu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ function get_cpu_info() {
314314
sysctl -n machdep.cpu.brand_string
315315
elif [ "Socket" == "${INFO_NAME}" ]; then
316316
sysctl -n hw.packages
317-
elif [ "Vendor" == "${INFO_NAME}" ]; then
317+
elif [ "^Vendor ID" == "${INFO_NAME}" ]; then
318318
if [ "${ARCH_HOST}" == "arm64" ]; then
319319
sysctl -n machdep.cpu.brand_string | cut -d' ' -f1
320320
else
@@ -477,7 +477,7 @@ function configure_cpu() {
477477
HOST_CPU_CORES=$(get_nproc)
478478
HOST_CPU_MODEL=$(get_cpu_info '^Model name:')
479479
HOST_CPU_SOCKETS=$(get_cpu_info 'Socket')
480-
HOST_CPU_VENDOR=$(get_cpu_info 'Vendor')
480+
HOST_CPU_VENDOR=$(get_cpu_info '^Vendor ID')
481481

482482
if [ "${HOST_CPU_SOCKETS}" = "-" ]; then
483483
HOST_CPU_SOCKETS=1

0 commit comments

Comments
 (0)