Merge pull request #2307 from sjackman/linux-cpu-arm
linux: Add ARM to CPU.type
This commit is contained in:
commit
8518b6c4f7
@ -12,6 +12,8 @@ module Hardware
|
|||||||
def type
|
def type
|
||||||
@type ||= if cpuinfo =~ /Intel|AMD/
|
@type ||= if cpuinfo =~ /Intel|AMD/
|
||||||
:intel
|
:intel
|
||||||
|
elsif cpuinfo =~ /ARM|Marvell/
|
||||||
|
:arm
|
||||||
else
|
else
|
||||||
:dunno
|
:dunno
|
||||||
end
|
end
|
||||||
@ -71,7 +73,7 @@ module Hardware
|
|||||||
end
|
end
|
||||||
|
|
||||||
def flags
|
def flags
|
||||||
@flags ||= cpuinfo[/^flags.*/, 0].split
|
@flags ||= cpuinfo[/^(flags|Features).*/, 0].split
|
||||||
end
|
end
|
||||||
|
|
||||||
# Compatibility with Mac method, which returns lowercase symbols
|
# Compatibility with Mac method, which returns lowercase symbols
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user