Skip to content

Commit

Permalink
Fix cases when reading from MSR returns an index
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsunyan committed Apr 17, 2018
1 parent cd32e7e commit ffacb8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions intel-undervolt.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function handle-apply() {

function tomv() {
awk '{ printf("%0.2f", and(lshift(1, 32) - rshift(strtonum($1), 21),
0x7ff) / 1.024) }' <<< "$1"
0x7ff) / 1.024) }' <<< "0x${1: -8}"
}

for i in `seq 0 $((${#indices[@]} - 1))`; do
Expand All @@ -102,7 +102,7 @@ function handle-apply() {
code="$?"

[ "$code" = '0' ] && {
[ "$value" = "${values[$i]}" ] ||
[ "${value: -8}" = "${values[$i]: -8}" ] ||
code='1'
}
true
Expand Down

0 comments on commit ffacb8d

Please sign in to comment.