From cc554c4ba1bdfd7094ba2e3a02082770d81b7a93 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 13 Jul 2018 08:54:08 +0100 Subject: [PATCH] extend/os/linux/hardware/cpu: return :dunno more often. This matches the behaviour described in the test and on macOS. --- Library/Homebrew/extend/os/linux/hardware/cpu.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/extend/os/linux/hardware/cpu.rb b/Library/Homebrew/extend/os/linux/hardware/cpu.rb index 0c1078fdfc..1dfca2ebe7 100644 --- a/Library/Homebrew/extend/os/linux/hardware/cpu.rb +++ b/Library/Homebrew/extend/os/linux/hardware/cpu.rb @@ -12,7 +12,6 @@ module Hardware # See https://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers cpu_family = cpuinfo[/^cpu family\s*: ([0-9]+)/, 1].to_i cpu_model = cpuinfo[/^model\s*: ([0-9]+)/, 1].to_i - cpu_family_model = "0x" + ((cpu_family << 8) | cpu_model).to_s(16) case cpu_family when 0x06 case cpu_model @@ -41,7 +40,7 @@ module Hardware when 0x8e :kabylake else - cpu_family_model + :dunno end when 0x0f case cpu_model @@ -50,10 +49,10 @@ module Hardware when 0x03, 0x04 :prescott else - cpu_family_model + :dunno end else - cpu_family_model + :dunno end end