aboutsummaryrefslogtreecommitdiff
path: root/cpufreq.lua
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 00:55:56 +0200
commitfcf1027cb5603ffd9b3275abc53448e480cdd183 (patch)
treec156ca29d177d5780fec49d7ca5dc9ae597f7b07 /cpufreq.lua
parentb4e028b21ffb5b8ee384516626345cf8150dcc02 (diff)
downloadvicious-legacy-fcf1027cb5603ffd9b3275abc53448e480cdd183.tar.xz
cpufreq: use string library for find/match
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