fs: add FreeBSD mount point detection to regexp
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
This commit is contained in:
parent
178bc65f1b
commit
9fc02f16da
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue