diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2011-03-29 16:41:24 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2011-03-29 16:41:24 +0200 |
commit | 729ceb7865daa55a9cab6d59ef26c3d355ad27dc (patch) | |
tree | ffde9d6b0f3cc3f167505136e7e0ae1363231f94 /widgets/dio.lua | |
parent | c2f7fbcf2358cf83b103954ec0dc579aea39e3cb (diff) | |
download | vicious-legacy-729ceb7865daa55a9cab6d59ef26c3d355ad27dc.tar.xz |
dio: import string.match()
Diffstat (limited to 'widgets/dio.lua')
-rw-r--r-- | widgets/dio.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/widgets/dio.lua b/widgets/dio.lua index db6ba39..145ae41 100644 --- a/widgets/dio.lua +++ b/widgets/dio.lua @@ -7,6 +7,7 @@ local pairs = pairs local io = { lines = io.lines } local setmetatable = setmetatable +local string = { match = string.match } local helpers = require("vicious.helpers") local os = { time = os.time, @@ -32,8 +33,8 @@ local function worker(format) for line in io.lines("/proc/diskstats") do local device, read, write = - -- Linux kernel docs: Documentation/iostats.txt - line:match("([^%s]+) %d+ %d+ (%d+) %d+ %d+ %d+ (%d+)") + -- Linux kernel documentation: Documentation/iostats.txt + string.match(line, "([^%s]+) %d+ %d+ (%d+) %d+ %d+ %d+ (%d+)") disk_lines[device] = { read, write } end |