Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2
On 08/20/2014 03:53 PM, Fridolin Pokorny wrote:
> Hi,
>
> I am about to implement /proc/self/mountinfo support for df. This feature is
> marked as TODO in sources. I have found a suitable parser provided by
> libmount
> from util-linux [1]. This could be the best option here in my opinion.
>
> The change might also reflect gnulib. Items in mount entries (struct
> mount_entry from mountlist.h) should be propagated from libmount.
>
> I want to know if such change will be accepted. Do you have any additional
> notes to discuss?
>
> Have a nice day,
> Fridolin Pokorny.
>
> [1] http://git.kernel.org/cgit/utils/util-linux/util-linux.git
Note the kernel processing to generate /proc/self/mountinfo is significant,
so ideally gnulib's read_file_system_list() would read that once (falling
back to /etc/mtab if not available).
There is more info in /proc/$$/mountinfo wrt bind mounts etc.
and I've yet to look into if any of that is useful for df.
I'd come up with a concrete set of advantages of using libmount before
proceeding.
Avoid stat()s may not warrant the change.
thanks,
Pádraig.