aboutsummaryrefslogtreecommitdiff
path: root/cpufreq.lua
diff options
context:
space:
mode:
Diffstat (limited to 'cpufreq.lua')
-rw-r--r--cpufreq.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpufreq.lua b/cpufreq.lua
index 0cd68eb..0acc304 100644
--- a/cpufreq.lua
+++ b/cpufreq.lua
@@ -44,8 +44,8 @@ local function worker(format, cpuid)
-- Get the current voltage
local f = io.open("/sys/devices/system/cpu/"..cpuid.."/cpufreq/scaling_voltages")
if f then for line in f:lines() do
- if line:find("^"..freq) then
- voltage.mv = line:match("[%d]+[%s]([%d]+)")
+ if string.find(line, "^"..freq) then
+ voltage.mv = string.match(line, "[%d]+[%s]([%d]+)")
break
end
end