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

Ladislav Michl ladis at linux-mips.org
Fri Jul 29 13:13:28 UTC 2005


On Fri, Jul 29, 2005 at 07:40:59AM -0500, Rob Landley wrote:
> > First, mount _does_ operate also on "magic" names. You can easily mount
> > usbfs, tmpfs, sysfs, proc, etc.
> 
> Those are filesystem types in -t, and it gets the names out of 
> either /etc/filesystems or /proc/filesystems.  (I'm told heuristics to 
> autodetect file types have been added recently, but that's a seperate issue.)
> 
> These are not magic directory names.  Associations between directories and 
> block devices are done in /etc/fstab, not hardwired into mount.  And 
> again, /etc/fstab is not going to have a relative path in it.

I have no clue what are you talking about. Sorry.

> > Now, MTD are not block devices (but there 
> > is block caching layer) and jffs2 operates directly on MTD. Historicaly,
> > block MTD was only needed to get mount point. Now it is also possible to
> > specify MTD name, so you do not need to have block device emulation
> > enabled. You can mount such devices this way:
> > mount -t jffs2 /dev/mtdblock1 /mnt        [1]
> > mount -t jffs2 mtd1 /mnt                  [2]
> > mount -t jffs2 mtd:somename /mnt          [3]
> > (last example assumes mtd1 is named "somename"). There are following
> > problems with mount:
> > * when /dev is working directory mtd1 (in [2]) gets expanded to
> >   /dev/mtd1 which is _wrong_. Solution is either patch I sent earlier or
> >   in case you want to 'normalize' device name, just check if it is block
> >   device (see patch below)
> 
> 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.
Nothing will break if you add check for block device. Note that
'mount -t jffs2 mtd1 /mnt' actually works if current directory is different
from /dev, otherwise fails, which is perfectly right, but not what user
wanted to do. I certainly can live with mount as currently implemented,
but I think change mentioned above would be usefull.

> > * when support for NFS is enabled [3] will fail, because test for NFS
> >   share is done by searching ':' in device name.
> 
> Yeah, and that's a bit of a hack.  I haven't addressed it in the rewrite 
> because I don't use NFS and thus wouldn't notice if I broke it, so I left 
> that part mostly as it was.

No problem with that :)

	ladis



More information about the busybox mailing list