From fcf1027cb5603ffd9b3275abc53448e480cdd183 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Sun, 4 Oct 2009 00:55:56 +0200 Subject: cpufreq: use string library for find/match --- cpufreq.lua | 4 ++-- 1 file 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 -- cgit v1.2.3