CPU: fix M2 detection

This commit is contained in:
Alexander Bayandin 2022-11-15 11:02:56 +00:00 committed by GitHub
parent 06b7573e0b
commit 449b872916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,7 +152,11 @@ module Hardware
end
def sysctl_int(key)
sysctl_n(key).to_i
if (x = sysctl_n(key).to_i) >= 0
x
else
x & 0xffffffff
end
end
def sysctl_n(*keys)