From 729ceb7865daa55a9cab6d59ef26c3d355ad27dc Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Tue, 29 Mar 2011 16:41:24 +0200 Subject: [PATCH] dio: import string.match() --- widgets/dio.lua | 5 +++-- 1 file 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