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>
This commit is contained in:
Martin Wimpress 2026-01-26 09:46:15 +00:00 committed by Martin Wimpress
parent 7825f33527
commit 4805fbd6f4
1 changed files with 2 additions and 2 deletions

View File

@ -314,7 +314,7 @@ function get_cpu_info() {
sysctl -n machdep.cpu.brand_string
elif [ "Socket" == "${INFO_NAME}" ]; then
sysctl -n hw.packages
elif [ "Vendor" == "${INFO_NAME}" ]; then
elif [ "^Vendor ID" == "${INFO_NAME}" ]; then
if [ "${ARCH_HOST}" == "arm64" ]; then
sysctl -n machdep.cpu.brand_string | cut -d' ' -f1
else
@ -477,7 +477,7 @@ function configure_cpu() {
HOST_CPU_CORES=$(get_nproc)
HOST_CPU_MODEL=$(get_cpu_info '^Model name:')
HOST_CPU_SOCKETS=$(get_cpu_info 'Socket')
HOST_CPU_VENDOR=$(get_cpu_info 'Vendor')
HOST_CPU_VENDOR=$(get_cpu_info '^Vendor ID')
if [ "${HOST_CPU_SOCKETS}" = "-" ]; then
HOST_CPU_SOCKETS=1