[BusyBox] Re: [BusyBox-cvs] svn commit: trunk/busybox: include networking

Rob Landley rob at landley.net
Sat Jul 30 00:41:52 UTC 2005


On Friday 29 July 2005 08:13, Ladislav Michl wrote:
> > So basically, you're requesting a new feature.  There are several
> > possible things you can mount filesystems on.  We currently support block
> > devices by default, and have config options to add support for loop
> > devices and for NFS. We don't support Samba, and apparently we don't
> > support whatever this MTD thing needs either at the moment.
>
> Eh, new feature? You curently support block devices (yes, loop is also
> block device) and you call stat to check if file exists. If so, you call
> bb_simplify_path on that name and pass such modified name to mount.

I extensively rewrote the mount code and am currently trying to finish 
everything up to check it in.  The code in mine now looks nothing like the 
existing mount logic, and has a number of cases.

1) If the name has a : in it, the NFS code takes over.  I didn't touch that 
much because I don't use NFS and could tell if I broke it.  (If somebody else 
wants to express an opinion here, go for it.)  In theory there are other 
network filesystems (smbfs) we'd want to support here, but don't yet.

2) It's a block device.  We know what to do with these.

3) It's a file.  Do /dev/loop association and substitute in that block device 
for the rest of the mount logic.

4) It's a directory.  There are splicing operations (like --bind or --move) 
that want a full path.

5) The block name passed in is just a comment, as in ramfs or procfs.

It seems like your need would fall under case 5.  -t jffs2 is in the same boat 
as -t ramfs or -t procfs, except the block name is an identifier rather than 
just a comment.  Right now the code is not special casing based on any 
filesystems, instead if you give us a relative path to an existing dentry, we 
_will_ cannonicalize it.  (The exception is the NFS "it has a : in it!" test 
which is really ugly...)

I'm close to finishing.  Working on it...

Rob



More information about the busybox mailing list