[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using /proc/mounts in mountlist.c for linux

From: Pádraig Brady
Subject: Re: Using /proc/mounts in mountlist.c for linux
Date: Wed, 06 Apr 2011 12:41:15 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100227 Thunderbird/3.0.3

On 06/04/11 12:03, Karel Zak wrote:
> On Tue, Apr 05, 2011 at 03:18:02PM +0100, Pádraig Brady wrote:
>> On 05/04/11 13:36, Philipp Thomas wrote:
>>> GNU find will not recognize file systems of type autofs on newer Linux
>>> kernels as autofs entries are only listed in /proc/mounts and mountlist.c
>>> includes glibc mntent.h which takes the _PATH_MOUNTED from paths.h and that
>>> is /etc/mtab.
>>> After a longer discussion, we (SUSE) chose to patch mountlist.c in findutils
>>> to use proc/mounts instead of /etc/mtab which fixed ou problem.
>>> Would gnulib accept the attached patch to mountlist.c?
>> Well locally I have symlinked /etc/mtab -> /proc/mounts since:
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f84e3f52
>> So this would not break anything for me.
>> Also I understand Fedora 15 will symlink /etc/mtab to /proc/mount too.
>> What about older kernels though?
>  If the find(1) command does not depend on mtab specific features
>  (e.g. user= mount option) then my suggestion is to use /proc/mounts
>  everywhere independently on the kernel version.
>  I guess that mount options are completely irrelevant for find(1),
>  right? So, /proc/mounts is the right choice.

OK from coreutils' point of view, /proc/mounts is better too.
So +1 from me.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]