[BusyBox] Endless corner cases...

Rob Landley rob at landley.net
Fri Jul 29 21:24:57 MDT 2005


On Friday 29 July 2005 21:50, Mike Frysinger wrote:
> On Friday 29 July 2005 10:26 pm, Rob Landley wrote:
> > In _theory_, you could specify a _file_ in /etc/fstab with "loop" as one
> > of the options and have it automatically loopback mount at a standard
> > location for normal users, or via a mount -a.
>
> not just theory, ive done it before ;)

Oh I can see it's useful, and would be highly non-obvious if it didn't work.  
Wasn't arguing we shouldn't support it. :)

> > Which means the fstab processing
> > either has to go before the substitution of /dev/loop* for the
> > blockDevice field, or the fstab code has to be aware of the difference
> > between loopFile and blockDevice.
>
> ive never looked at the mount code so i dont really see why this is a
> corner case ... fstab processing rules are pretty plain and simple ...
> start at the first one and service it until all of them are done ...

It's not really a corner case, it's a sequencing issue.  Portions of the code 
want to know device they're really operating on (/dev/loop0 is substituted 
for the filename passed on the command line) and other portions of the code 
want to know what the command line said...

I _think_ I've gotten this bit untangled again.  Have to add a test case...

Oh, and the final fix to loop.c actually turns out to be "If this was built 
against 2.6 headers, use the 64 bit API.  Otherwise use the 32 bit 
API."  (The breakage in the 2.6 headers describing the 32 bit API becomes a 
moot point, then.  AND on 2.6 we can just include linux/loop.h because Mazur 
cleaned it up and it's a supported (by him) userspace API now, albeit 
linux-specific...)

> do you plan on trying to add support for parallel mounting (-F) ?

Never heard of it.  (Rummages...)

Not really.  You want to fork?  Do something like:

for i in `cat /etc/fstab |awk '{print $1}'`; do mount  $i &; done

Somebody else wants to propose a patch I'll look at it, but it seems a bit out 
of scope for busybox...

Rob


More information about the busybox mailing list