fs: minor coding style change

This commit is contained in:
Adrian C. (anrxc) 2009-11-12 01:41:33 +01:00
parent f5b47dca8b
commit 249294551e
1 changed files with 2 additions and 3 deletions

5
fs.lua
View File

@ -27,9 +27,8 @@ local function worker(format, nfs)
for line in f:lines() do for line in f:lines() do
if not string.match(line, "^Filesystem.*") then if not string.match(line, "^Filesystem.*") then
local size, used, avail, usep, mount = local size, used, avail, usep, mount = string.match(line, -- Match all (network file systems too)
-- Match all at once, including network file systems "^[%w%p]+[%s]+([%d%.]+)[%a]?[%s]+([%d%.]+)[%a]?[%s]+([%d%.]+)[%a]?[%s]+([%d]+)%%[%s]+([%w%p]+)$")
string.match(line, "^[%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.." size}"] = tonumber(size)
fs_info["{"..mount.." used}"] = tonumber(used) fs_info["{"..mount.." used}"] = tonumber(used)