From 249294551e91b84a0c8bd81f128db8c749651677 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Thu, 12 Nov 2009 01:41:33 +0100 Subject: fs: minor coding style change --- fs.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs.lua b/fs.lua index 28c84a6..a56a282 100644 --- a/fs.lua +++ b/fs.lua @@ -27,9 +27,8 @@ local function worker(format, nfs) for line in f:lines() do if not string.match(line, "^Filesystem.*") then - local size, used, avail, usep, mount = - -- Match all at once, including network file systems - string.match(line, "^[%w%p]+[%s]+([%d%.]+)[%a]?[%s]+([%d%.]+)[%a]?[%s]+([%d%.]+)[%a]?[%s]+([%d]+)%%[%s]+([%w%p]+)$") + local size, used, avail, usep, mount = string.match(line, -- Match all (network file systems too) + "^[%w%p]+[%s]+([%d%.]+)[%a]?[%s]+([%d%.]+)[%a]?[%s]+([%d%.]+)[%a]?[%s]+([%d]+)%%[%s]+([%w%p]+)$") fs_info["{"..mount.." size}"] = tonumber(size) fs_info["{"..mount.." used}"] = tonumber(used) -- cgit v1.2.3