Re: About /etc/mtab and /proc/mounts

From: Kasper Dupont (kasperd@daimi.au.dk)
Date: Thu Feb 27 2003 - 03:12:28 EST


Dominik Kubla wrote:
>
> I would recommend to replace /etc/mtab with a pseudo-FS like Sun did
> for /etc/mnttab:
>
> # uname -rs
> SunOS 5.8
> # mount -p
> ...
> mnttab - /etc/mnttab mntfs - no dev=39c0000
> ...

How does that thing behave? I have considered a /proc/mtab implementation,
that might be slightly similar. It would have to be like /proc/mounts, but
differ in a few fields. The mountpoint and filesystem fields should be
exactly like /proc/mounts, while the device and options fields should be
strings initialized with the same values as /proc/mounts, but otherwise
writable from userspace.

Every line written to /proc/mtab should be parsed into the fields, and
the mountpoints should be searched for a match, if a match is found, the
device and options fields are updated, otherwise the write is simply
ignored.

How does people like this idea? Should something more be done about the
options field? Should they be checked for obvious inconsistencies, or
should a write attempt to remount the filesystem with the new options?

-- 
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:aaarep@daimi.au.dk
for(_=52;_;(_%5)||(_/=5),(_%5)&&(_-=2))putchar(_);
-
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 Feb 28 2003 - 22:00:40 EST