[lkml]   [1996]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: /proc/misc has bad mode
Date wrote:
>Matthias Urlichs:
>Yes, /etc/mtab has
> /tmp/fdimage /mnt msdos rw,loop=/dev/loop0,blocksize=1024 0 0
> /dev/cdrom /cd iso9660 ro,noexec,nosuid,nodev,unhide 0 0
>where /proc/mounts has
> /dev/loop0 /mnt msdos rw 0 0
> /dev/cdrom /cd iso9660 ro,noexec,nosuid,nodev 0 0
>It follows that /proc/mounts cannot yet replace /etc/mtab -
>some mount options are invisible in /proc/mounts.

Well, I never use "unhide", I patched my loopback device and my mount
binary so that closing or unmounting /dev/loop? automatically disassociates
the device from the file, and I only mount /path/to/disks/name under
/file/name, so that's not a problem for me. ;-)

IMHO it is a mistake for /dev/loop? to remember its association to a file
after it's closed. What for? Presumably, after the program which uses it is
done, it's done, and instead of "loattach FILE DEVICE; program arguments;
lodetach DEVICE" we can simply add an execvp() call at the end of loattach
and write "loattach DEVICE FILE program arguments". Or whatever. That would
have the added benefit to not require umount to depend on correct contents
of /proc/mounts or /etc/mtab.

The only problem with this would be a program which believes in closing all
file descriptors it doesn't want to know about, but these are a major pain
in the ass anyway (just try to use a Makefile which calls ssh).

>Three months ago or so I submitted a correct /proc/mounttable
>and /proc/swaptable, but since it was not used, I must now
>leave it to others to polish /proc/mounts (and add /proc/swaps (ugh)).
Do you still have that patch? I'm interested.

I'll pick up my papers,
and smile at the sky.
I know that the hypnotized
never lie.
Matthias Urlichs \ Noris Network GmbH i.Gr/ Xlink-POP Nürnberg
Schleiermacherstraße 12 \ Linux+Internet / EMail:
90491 Nürnberg (Germany) \ Consulting+Programming+Networking+etc'ing
PGP: 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE
Click <A HREF="">here</A>. 42

 \ /
  Last update: 2005-03-22 13:37    [W:0.095 / U:2.572 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site