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:
Andre Klärner 2014-04-10 12:28:20 +02:00 committed by copycat-killer
parent a0ef929416
commit 6983b919cd
1 changed files with 1 additions and 1 deletions

View File

@ -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]+)")