[PATCH][BZ 19108] paths: use /proc/mounts instead of mtab
Florian Weimer
fweimer@redhat.com
Fri Dec 11 12:36:00 GMT 2015
On 11/18/2015 03:30 PM, Jason A. Donenfeld wrote:
> -#define _PATH_MOUNTED "/etc/mtab"
> +#define _PATH_MOUNTED "/proc/mounts"
Why not /proc/self/mounts? I don't know if there is a difference;
readlink on paths under /proc often does not provide accurate information.
I suspect a better way is for distributions to make /etc/mtab a symbolic
link to whatever location they need. Fedora uses /proc/self/mounts, for
instance.
Florian
More information about the Libc-alpha
mailing list