lkml.org 
[lkml]   [2003]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: About /etc/mtab and /proc/mounts
Date
On Thursday 27 February 2003 09:12, Kasper Dupont wrote:
> Dominik Kubla wrote:
> > I would recommend to replace /etc/mtab with a pseudo-FS like Sun did
> > for /etc/mnttab:
...
> How does that thing behave? I have considered a /proc/mtab implementation,
> that might be slightly similar.

Quoting the Solaris 8 man page:

File Formats mnttab(4)

NAME
mnttab - mounted file system table

DESCRIPTION
The file /etc/mnttab is really a file system that provides
read-only access to the table of mounted file systems for
the current host. /etc/mnttab is read by programs using the
routines described in getmntent(3C). Mounting a file system
adds an entry to this table. Unmounting removes an entry
from this table. Remounting a file system causes the infor-
mation in the mounted file system table to be updated to
reflect any changes caused by the remount. The list is main-
tained by the kernel in order of mount time. That is, the
first mounted file system is first in the list and the most
recently mounted file system is last. When mounted on a
mount point the file system appears as a regular file con-
taining the current mnttab information.
[...]
NOTES
The snapshot of the mnttab information is taken any time a
read(2) is performed at offset 0 (the beginning) of the
mnttab file. The file modification time returned by stat(2)
for the mnttab file is the time of the last change to
mounted file system information. A poll(2) system call
requesting a POLLRDBAND event can be used to block and wait
for the system's mounted file system information to be dif-
ferent from the most recent snapshot since the mnttab file
was opened.

Regards,
Dominik Kubla
--
"What this country needs is a short, victorious war to stem the tide of
revolution." (V.K. von Plehve, Russian Minister of Interior on the eve of
the Russo-Japanese war.)

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.066 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site