From 3ea43e02541ece750ffc6cd1dfe34195421b4ef3 Mon Sep 17 00:00:00 2001 From: Fridolin Pokorny Date: Wed, 27 Aug 2014 15:25:30 +0200 Subject: mountlist: use /proc/self/mountinfo when available Use libmount to propagate device IDs provided by Linux in /proc/self/mountinfo. This will give more accurate output when using df in chroot'ed environments as the device IDs are not determined by stat() which may be inaccurate within the chroot. * lib/mountlist.c (read_file_system_list): Use the libmount routines from util-linux to parse "/proc/self/mountinfo" or fall back to standard getmntent() processing. * m4/ls-mntd-fs.m4: Check for libmount only when 1-argument getmntent() is used, as is the case on GNU/Linux. * DEPENDENCIES: Mention the optional util-linux dependency. --- DEPENDENCIES | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'DEPENDENCIES') diff --git a/DEPENDENCIES b/DEPENDENCIES index e19a37e7a7..44f7ca04df 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -162,3 +162,10 @@ at any time. + Download: http://ftp.gnu.org/gnu/libtool/ ftp://ftp.gnu.org/gnu/libtool/ + +* util-linux + + Optional. + Needed if you want to support /proc/self/mountinfo available on Linux. + This will give an ability to propagate device ID of a mounted file system. + + Download: + http://www.kernel.org/pub/linux/utils/util-linux/ -- cgit v1.2.1