CPU Speed: Don't use read

This commit is contained in:
Dylan Araps 2016-10-23 11:13:40 +11:00
parent 8c93c3b6c3
commit f4b266b5c6
1 changed files with 2 additions and 2 deletions

View File

@ -702,8 +702,8 @@ getcpu() {
esac
# Fallback to cpuinfo_max_freq if $speed_type fails
read -t 1 -r speed < "${speed_dir}/${speed_type}" || \
read -t 1 -r speed < "${speed_dir}/cpuinfo_max_freq"
speed="$(< "${speed_dir}/${speed_type}")" || \
speed="$(< "${speed_dir}/cpuinfo_max_freq")"
speed="$((speed / 100000))"
else