diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-10-04 00:55:56 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-10-04 00:55:56 +0200 |
commit | fcf1027cb5603ffd9b3275abc53448e480cdd183 (patch) | |
tree | c156ca29d177d5780fec49d7ca5dc9ae597f7b07 | |
parent | b4e028b21ffb5b8ee384516626345cf8150dcc02 (diff) | |
download | vicious-legacy-fcf1027cb5603ffd9b3275abc53448e480cdd183.tar.xz |
cpufreq: use string library for find/match
-rw-r--r-- | cpufreq.lua | 4 |
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 |