]> Savannah Git Hosting - gnulib.git/commit
mountlist: use /proc/self/mountinfo when available
authorFridolin Pokorny <fpokorny@redhat.com>
Wed, 27 Aug 2014 13:25:30 +0000 (15:25 +0200)
committerPádraig Brady <P@draigBrady.com>
Tue, 9 Sep 2014 11:56:04 +0000 (12:56 +0100)
commit3ea43e02541ece750ffc6cd1dfe34195421b4ef3
tree7fb4ba60cf0c76006c8d535d20bda9129a6350e1
parent2bf7326e10fae4abef536486aa9819331596c379
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.
ChangeLog
DEPENDENCIES
lib/mountlist.c
m4/ls-mntd-fs.m4