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:
parent
7825f33527
commit
4805fbd6f4
4
quickemu
4
quickemu
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue