diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-10-05 00:10:47 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-10-05 00:13:38 +0200 |
commit | d81eed6d310bce28b3709980d80c433a04eefaae (patch) | |
tree | 3ab65939b04a86d22e39ad6a4a5ac3ab122257b8 /fs.lua | |
parent | c2b68ad3e78e366e611600f54dcfa8d760ed026f (diff) | |
download | vicious-legacy-d81eed6d310bce28b3709980d80c433a04eefaae.tar.xz |
Lots of coding style changes
Diffstat (limited to 'fs.lua')
-rw-r--r-- | fs.lua | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -7,6 +7,7 @@ -- {{{ Grab environment local io = { popen = io.popen } local setmetatable = setmetatable +local string = { match = string.match } -- }}} @@ -24,10 +25,10 @@ local function worker(format, nfs) local fs_info = {} for line in f:lines() do - if not line:match("^Filesystem.*") then + if not string.match(line, "^Filesystem.*") then local size, used, avail, usep, mount = -- Match all at once, including network file systems - line:match("^[%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}"] = size fs_info["{"..mount.." used}"] = used |