[patch] fix find_mount_point() (bug #145)

Rob Landley rob at landley.net
Wed Mar 29 09:17:40 PST 2006


On Wednesday 29 March 2006 5:25 am, Bernhard Fischer wrote:
> Hi,
>
> I'll check in the attached patch to fix find_mount_point() for the case
> that / is /dev/root.
>
> This closes bug #145 (http://bugs.busybox.net/view.php?id=145)

Explicitly skipping rootfs screws up anybody whose real root is in fact 
rootfs.  (Such as an initramfs user who doesn't switch_root off but just 
splices other filesystems underneath.)

I think our current problem is that you can overmount any arbitrary mount 
point, and what find_mount_point should find is the last match, not the first 
match.  The recent banging on mount.c changed the logic there to do this.

The other option is to only care about block device backed filesystems, which 
the current mount also has logic for that could be shuffled into libbb.  The 
downside to this is that tmpfs can also have a size.  (In the current 
example, /dev/shm should probably be reported.)

Rob
-- 
Never bet against the cheap plastic solution.


More information about the busybox mailing list