Re: /sbin/mount and /proc/mounts difference

From: Urban Widmark (urban@teststation.com)
Date: Mon Nov 19 2001 - 09:51:02 EST


On Mon, 19 Nov 2001, Martin Dalecki wrote:

> Urban Widmark wrote:
> >
> > mount writes everything to /etc/mtab and displays that when asked.
>
> Not quite...
>
> ~/tmp# strings /bin/mount | grep mounts
> Note that one does not really mount a device, one mounts
> /proc/mounts
> ~/tmp#

Not sure what you are trying to show with that grep ...

# strace mount |& grep mounts
# strace mount |& grep mtab
open("/etc/mtab", O_RDONLY) = 3

mount does read /etc/mtab for displaying the mounts. It only looks at
/proc/mounts if /etc/mtab can't be read. Or at least, that is what the
version(s) I have does. I would say that the common setup is to have a
readable mtab.

/Urban

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 23 2001 - 21:00:20 EST