mirror of https://github.com/lcpz/lain.git
ask df for a specific filesystem
POSIX df supports requesting a single filesystem, so doing so will ensure that df can only get stuck if the filesystem we requested is in a hung state.
This commit is contained in:
parent
a0ef929416
commit
6983b919cd
|
@ -67,7 +67,7 @@ local function worker(args)
|
||||||
fs_info = {}
|
fs_info = {}
|
||||||
fs_now = {}
|
fs_now = {}
|
||||||
|
|
||||||
local f = io.popen("LC_ALL=C df -kP")
|
local f = io.popen("LC_ALL=C df -kP " .. partition)
|
||||||
|
|
||||||
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]+)")
|
||||||
|
|
Loading…
Reference in New Issue