aboutsummaryrefslogtreecommitdiff
path: root/fs.lua
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2009-10-05 00:10:47 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2009-10-05 00:10:47 +0200
commit4602ca2fa5e8e2e408713f72ae7e4cd14480bc01 (patch)
treebfbf75b8afd738f5a036737404f3eafe87586c66 /fs.lua
parentaf4e85f99d0ac63127f19640ef47d768d7bed7cd (diff)
downloadvicious-legacy-4602ca2fa5e8e2e408713f72ae7e4cd14480bc01.tar.xz
Lots of coding style changes
Diffstat (limited to 'fs.lua')
-rw-r--r--fs.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs.lua b/fs.lua
index a65a1ff..3aaaefb 100644
--- a/fs.lua
+++ b/fs.lua
@@ -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