Christoph Hellwig wrote:
I suspect not one cares about /etc/mtab. It's a pretty horrible
interface. Use /proc/self/mounts if your care about the mount table
for your current namespace, it's guranteed uptodate.
Well, it's uptodate, but it isn't the same as mtab. Like:
/tmp/test on /mnt/test type ext2 (rw,loop=/dev/loop/0)
(mtab), vs
/dev/loop/0 /mnt/test ext2 rw 0 0
or:
tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
vs
tmpfs /dev tmpfs rw 0 0
ie, sometimes, mtab format is more useful. Also, with the
above example with loop device, umount is able to delete the
loop device for loop-mounts.
Another funky example:
losetup /dev/loop/0 /tmp/test
cd /dev/loop
mount 0 /mnt/test
now, mtab shows:
/dev/loop/0 /mnt/test ext2 rw 0 0
while /proc/mounts shows
0 /mnt/test ext2 rw 0 0
which is rather useless.
/mjt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]