On Wed Oct 25, 2000 at 08:16:07PM +0200, Andries Brouwer wrote:
>
> Your web page misses the loop device info.
>
> Another point of difference is the name of the root device.
> /proc/mounts has /dev/root, while /etc/mtab usually has
> whatever was listed for / in /etc/fstab.
>
> For some applications it is important to get the name of the
> root device right. (I wrote a mount_guess_rootdev.c found in
> the latest util-linux (2.10p), but not yet used because the
> information in /etc/fstab is normally better.)
I did a similar find_real_root_device_name() in busybox some time back.
Basically, do a stat("/", &rootstat) then walk /dev stat'ing each file
and if (statbuf.st_rdev == rootstat.st_rdev) then you have a match.
Works fine.
>
> But before doing more extensive things, we might wait a bit and see
> what happens with 2.4. The new mount stuff allows people to build
> immensely complicated mount structures. No doubt this has security
> implications, and probably security conscious stuff will have to be
> partially rewritten. I could imagine that we'll discover the need
> for new system calls, maybe mtable(), or mstat() to find out about
> the mount status of a file or directory. No design exists as yet.
I wrote a /dev/mounts device driver some time ago.
ftp://oss.lineo.com/busybox/kernel-patches/devps.patch.9_25_2000
-Erik
-- Erik B. Andersen email: andersee@debian.org --This message was written using 73% post-consumer electrons-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Oct 31 2000 - 21:00:16 EST