In article <3981EAEB.E2B0EE0C@transmeta.com> you wrote:
> Alexander Viro wrote:
>> >
>> > Well, it is necessary that the bindings are listed somewhere.
>> > Personally, I would prefer a /proc/vfsbind or something like that, and
>> > be done with it.
>>
>> Erm? They are already in /proc/mounts, for one thing...
> /proc/mounts is a bad location, I think; for one thing, the number of
> actual mount at least used to be :) fairly limited. Also, /proc/mounts
> is impossible to parse cleanly -- if you have mount points with spaces
> or
> \n or some such you can really wreck havoc (we need a standard escaping
> algorithm for /proc, or insert null terminators.)
Please do it right and use something like a directory per mount:
/proc/xmounts/<nr>/
mountpoint (file with content of the mount target
directory)
device (whatever is in the device value)
fstype (you get the drift)
options
...
Iterate <nr> for all mounts.
Most clean way, easy to parse, unambigous.
Ciao, Marcus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:28 EST