aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2009-10-04 00:55:56 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2009-10-04 16:06:47 +0200
commit191766f8fb36da478b10282de670f1224fab8ed2 (patch)
tree0cf843719afa7cd8a23ae706ec30fc7ecd457067
parent24675d658a23be73d2fc313dd8c55f7a107ffbb4 (diff)
downloadvicious-legacy-191766f8fb36da478b10282de670f1224fab8ed2.tar.xz
cpufreq: use string library for find/match
-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