This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ 19108] paths: use /proc/mounts instead of mtab
- From: Florian Weimer <fweimer at redhat dot com>
- To: "Jason A. Donenfeld" <Jason at zx2c4 dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 11 Dec 2015 13:36:54 +0100
- Subject: Re: [PATCH][BZ 19108] paths: use /proc/mounts instead of mtab
- Authentication-results: sourceware.org; auth=none
- References: <1447857002-9791-1-git-send-email-Jason at zx2c4 dot com>
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