Fix printing of microcode to use cpuinfo values

The values used should be the ones that come from cpuinfo instead of
the test values. The following line will print the last tuple tested
instead of the actual values of the CPU.

Line 689: _debug "is_ucode_blacklisted: no ($model/$stepping/$ucode)"
This commit is contained in:
Joseph Mulloy 2018-01-26 10:44:44 -05:00 committed by Stéphane Lesimple
parent bf46fd5d9b
commit 7404929661

View File

@ -681,12 +681,12 @@ is_ucode_blacklisted()
stepping=$(( $(echo $tuple | cut -d, -f2) )) stepping=$(( $(echo $tuple | cut -d, -f2) ))
ucode=$(echo $tuple | cut -d, -f3) ucode=$(echo $tuple | cut -d, -f3)
if [ "$cpu_model" = "$model" ] && [ "$cpu_stepping" = "$stepping" ] && echo "$cpu_ucode" | grep -qi "^$ucode$"; then if [ "$cpu_model" = "$model" ] && [ "$cpu_stepping" = "$stepping" ] && echo "$cpu_ucode" | grep -qi "^$ucode$"; then
_debug "is_ucode_blacklisted: we have a match! ($model/$stepping/$ucode)" _debug "is_ucode_blacklisted: we have a match! ($cpu_model/$cpu_stepping/$cpu_ucode)"
bad_ucode_found="Intel CPU Family 6 Model $model Stepping $stepping with microcode $ucode" bad_ucode_found="Intel CPU Family 6 Model $cpu_model Stepping $cpu_stepping with microcode $cpu_ucode"
return 0 return 0
fi fi
done done
_debug "is_ucode_blacklisted: no ($model/$stepping/$ucode)" _debug "is_ucode_blacklisted: no ($cpu_model/$cpu_stepping/$cpu_ucode)"
return 1 return 1
} }