On Sunday 27 June 2010 10:16:26 [email protected] wrote:
> 16283 mount("/dev/sda11", "/mnt/tmp", "yaffs", MS_MGC_VAL, NULL) = -1
> ENODEV (No such device)
> 16283 rt_sigprocmask(SIG_UNBLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0
> 16283 open("/proc/filesystems", O_RDONLY|O_LARGEFILE) = 3
> 16283 fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
> 16283 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
> -1, 0) = 0xb7c38000

The big fluffy mount command is getting back the same ENODEV from the kernel 
we're getting back, and is then opening /proc/filesystems to explicitly check 
and see if "yaffs" is listed in there.

I.E. they added extra code to give a more informative error message, which is 
one if the reasons their implementation is bigger than our implementation.

As far as I can tell, what you're saying is "The busybox implementation is 
smaller and simpler, which does not work well for me, but I don't want to use 
the other implementation, instead I would like you to add extra code to make 
busybox bigger".

Possibly this is another thing that Denys could have his CONFIG_DESKTOP switch 
do?  (The point of that thing is to make busybox big and fluffy, isn't it?)

By the way, ENODEV doesn't really mean "no device", it essentially means no 
such _driver_.  In this case, the missing driver is the filesystem driver, not 
the block device driver.  (Note that in the case of tmpfs, procfs, smbfs, and 
so on, there _is_ no block device.  Those filesystem drivers talk to something 
other than a block device, and the "target" argument to mount(2) may be a 
network address or even just a comment field.)

In fact, according to the man 2 mount:

       ENODEV filesystemtype not configured in the kernel.

So that implies this error code from this system call is _always_ due to the 
filesystem driver.  The C library is translating that errno into 'No such 
device", but that's an oversimplification.  No driver is taking responsibility 
for this request.

Rob
-- 
GPLv3: as worthy a successor as The Phantom Meanace, as timely as Duke Nukem 
Forever, and as welcome as New Coke.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to