Fix broken cpu speed on NetBSD

This commit is contained in:
Dylan 2016-04-04 22:20:15 +10:00
parent b07d18d6d0
commit 8d67097a32
1 changed files with 1 additions and 5 deletions

View File

@ -977,11 +977,7 @@ getcpu () {
speed=$((speed / 100000)) speed=$((speed / 100000))
else else
speed=$(awk -F ': |\\.' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo) speed=$(awk -F ': |\\.' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo)
speed=$((speed / 100))
case "$distro" in
"NetBSD"*) speed=$((speed / 10000)) ;;
*) speed=$((speed / 100)) ;;
esac
fi fi
cores=$(awk -F ': ' '/siblings/ {printf $2; exit}' /proc/cpuinfo) cores=$(awk -F ': ' '/siblings/ {printf $2; exit}' /proc/cpuinfo)