fs: add FreeBSD mount point detection to regexp

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
This commit is contained in:
Andrew Merenbach 2014-03-07 22:23:18 +02:00 committed by Adrian C. (anrxc)
parent 178bc65f1b
commit 9fc02f16da
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ local function worker(format, warg)
for line in f:lines() do -- Match: (size) (used)(avail)(use%) (mount) for line in f:lines() do -- Match: (size) (used)(avail)(use%) (mount)
local s = string.match(line, "^.-[%s]([%d]+)") local s = string.match(line, "^.-[%s]([%d]+)")
local u,a,p = string.match(line, "([%d]+)[%D]+([%d]+)[%D]+([%d]+)%%") local u,a,p = string.match(line, "([%d]+)[%D]+([%d]+)[%D]+([%d]+)%%")
local m = string.match(line, "%%[%s]([%p%w]+)") local m = string.match(line, "%%[%s]+([%p%w]+)")
if u and m then -- Handle 1st line and broken regexp if u and m then -- Handle 1st line and broken regexp
helpers.uformat(fs_info, m .. " size", s, unit) helpers.uformat(fs_info, m .. " size", s, unit)