Strange filesystem mounting behavior

Etienne Fortin etienne.fortin at sensio.tv
Tue Oct 5 20:42:17 UTC 2004


I'm currently testing mounting a filesystem. It's a very little program
based on the "fileio" sample. As we can expect from early tests, it
doesn't work :)

And the reason why it doesn't work is strange. I use the dosfs file
system so my call to rtems_fsmount use the msdos_ops pointer, exactly
like for the fileio sample. I single step into my code and apparently,
it bust on these lines in mount.c:mount() function:

                /* 
 	188	     *  This link to the parent is only done when we are
dealing with system 
 	189	     *  below the base file system 
 	190	     */
 	191	
-	192	    if ( !loc.ops->mount_h ){
-	193	      errno = ENOTSUP;
-	194	      goto cleanup_and_bail;
 	195	    }

It's quite confusing. DOSFS doesn't have any function for mounting. It's
obvious. The check above seems to be ALWAYS done when mounting a file
system.

My question is: How come the dosfs file system EVER work in an RTEMS
compilation? I mean, if the dosfs filesystem doesn't have any mount
handler and that mount.c:mount() throw an error whatever the filesystem
has no mount handler, how can this dosfs thing works at all? And how can
the fileio sample work either? It compiles OK, but how can it works with
such an if statement in mount.c:mount()????

Etienne Fortin
Sensio




More information about the users mailing list