bug fix for aarch64 arm cpu bug, this should complete issue #107

This commit is contained in:
Harald Hope 2017-06-06 20:23:25 -07:00
parent 88cde47144
commit 51f547c5bb

22
inxi
View file

@ -4482,17 +4482,22 @@ get_cpu_data()
bProcInt = "true" bProcInt = "true"
} }
else { else {
# note: alternate:
# Processor : AArch64 Processor rev 4 (aarch64)
if ( $NF ~ "^(ARM|AArch)" ) {
bArm = "true"
}
# this protects against double processor lines, one int, one string # this protects against double processor lines, one int, one string
if ( bProcInt == "false" ){ if ( bProcInt == "false" ){
count += 1 count += 1
nr = count - 1 nr = count - 1
cpu[nr, "model"] = $NF
} }
# note: alternate:
# Processor : AArch64 Processor rev 4 (aarch64)
# but no model name type
if ( $NF ~ "(ARM|AArch)" ) {
bArm = "true"
}
gsub(/'"$BAN_LIST_NORMAL"'/, "", $NF )
gsub(/'"$BAN_LIST_CPU"'/, "", $NF )
gsub(/^ +| +$/, "", $NF)
gsub(/ [ \t]+/, " ", $NF)
cpu[nr, "model"] = $NF
} }
} }
/^model name|^cpu\t+:/ { /^model name|^cpu\t+:/ {
@ -4502,7 +4507,7 @@ get_cpu_data()
gsub(/^ +| +$/, "", $NF) gsub(/^ +| +$/, "", $NF)
gsub(/ [ \t]+/, " ", $NF) gsub(/ [ \t]+/, " ", $NF)
cpu[nr, "model"] = $NF cpu[nr, "model"] = $NF
if ( $NF ~ "^ARM" ) { if ( $NF ~ "^(ARM|AArch)" ) {
bArm = "true" bArm = "true"
} }
} }
@ -4534,6 +4539,7 @@ get_cpu_data()
} }
/^bogomips/ { /^bogomips/ {
cpu[nr, "bogomips"] = $NF cpu[nr, "bogomips"] = $NF
# print nr " " cpu[nr, "bogomips"] > "/dev/tty"
} }
/vendor_id/ { /vendor_id/ {
gsub(/genuine|authentic/,"",$NF) gsub(/genuine|authentic/,"",$NF)
@ -4552,6 +4558,7 @@ get_cpu_data()
} }
else if ( cpu[i, "bogomips"] != "" && cpu[i, "speed"] == "" ) { else if ( cpu[i, "bogomips"] != "" && cpu[i, "speed"] == "" ) {
cpu[i, "speed"] = cpu[i, "bogomips"] cpu[i, "speed"] = cpu[i, "bogomips"]
} }
print cpu[i, "model"] "," cpu[i, "speed"] "," cpu[i, "cache"] "," cpu[i, "flags"] "," cpu[i, "bogomips"] "," cpu[nr, "vendor"] "," bArm print cpu[i, "model"] "," cpu[i, "speed"] "," cpu[i, "cache"] "," cpu[i, "flags"] "," cpu[i, "bogomips"] "," cpu[nr, "vendor"] "," bArm
} }
@ -4846,7 +4853,6 @@ get_cpu_ht_multicore_smp_data()
# Processor : AArch64 Processor rev 4 (aarch64) # Processor : AArch64 Processor rev 4 (aarch64)
if ( $NF ~ "^(ARM|AArch)" ) { if ( $NF ~ "^(ARM|AArch)" ) {
bArm = "true" bArm = "true"
} }
# this protects against double processor lines, one int, one string # this protects against double processor lines, one int, one string
if ( bProcInt == "false" ){ if ( bProcInt == "false" ){