<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2010-05-31)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ccj</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-05-31      Chris Johns <chrisj@rtems.org>

        * shared/umon/tfsDriver.c: Updated to the new mount API.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/shared/umon/tfsDriver.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>c/src/lib/libbsp/shared/umon/tfsDriver.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/shared/umon/tfsDriver.c:1.4 rtems/c/src/lib/libbsp/shared/umon/tfsDriver.c:1.5
--- rtems/c/src/lib/libbsp/shared/umon/tfsDriver.c:1.4  Fri May 28 01:18:27 2010
+++ rtems/c/src/lib/libbsp/shared/umon/tfsDriver.c      Mon May 31 09:01:31 2010
</font><font color='#997700'>@@ -101,26 +101,27 @@
</font> };
 
 static int rtems_tfs_mount_me(
<font color='#880000'>-  rtems_filesystem_mount_table_entry_t *temp_mt_entry
</font><font color='#000088'>+  rtems_filesystem_mount_table_entry_t *mt_entry,
+  const void                           *data
</font> )
 {
   rtems_status_code  sc;
 
<font color='#880000'>-  temp_mt_entry->mt_fs_root.handlers = &rtems_tfs_handlers;
-  temp_mt_entry->mt_fs_root.ops      = &rtems_tfs_ops;
</font><font color='#000088'>+  mt_entry->mt_fs_root.handlers = &rtems_tfs_handlers;
+  mt_entry->mt_fs_root.ops      = &rtems_tfs_ops;
</font> 
   /* We have no TFS specific data to maintain.  This filesystem
    * may only be mounted once. And we maintain no real filesystem
    * nodes, so there is no real root.
    */
 
<font color='#880000'>-  temp_mt_entry->fs_info                = NULL;
-  temp_mt_entry->mt_fs_root.node_access = ROOT_NODE_ACCESS;
</font><font color='#000088'>+  mt_entry->fs_info                = NULL;
+  mt_entry->mt_fs_root.node_access = ROOT_NODE_ACCESS;
</font> 
   /* These need to be looked at for full POSIX semantics.
    */
 
<font color='#880000'>-  temp_mt_entry->pathconf_limits_and_options = rtems_tfs_limits_and_options;
</font><font color='#000088'>+  mt_entry->pathconf_limits_and_options = rtems_tfs_limits_and_options;
</font> 
 
   /*  Now allocate a semaphore for mutual exclusion.
<font color='#997700'>@@ -150,8 +151,7 @@
</font>   const char *path
 )
 {
<font color='#880000'>-  int                                   status;
-  rtems_filesystem_mount_table_entry_t *entry;
</font><font color='#000088'>+  int status;
</font> 
   if (!path) {
     printk( "TFS: No mount point specified\n" );
<font color='#997700'>@@ -166,10 +166,12 @@
</font>     return status;
   }
 
<font color='#880000'>-  status = mount( &entry, &rtems_tfs_ops, RTEMS_FILESYSTEM_READ_WRITE,
-            NULL, TFS_PATHNAME_PREFIX);
</font><font color='#000088'>+  if (rtems_filesystem_register( "tfs", rtems_tfs_mount_me ) < 0)
+    return -1;
+<span style="background-color: #FF0000">  </span>
+  status = mount( "umon", TFS_PATHNAME_PREFIX, "tfs", RTEMS_FILESYSTEM_READ_WRITE, NULL);
</font> 
<font color='#880000'>-  if (status) {
</font><font color='#000088'>+  if (status < 0) {
</font>     printk( "TFS: Unable to mount on %s\n", TFS_PATHNAME_PREFIX );
     perror("TFS mount failed");
   }
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ccj</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-05-31      Chris Johns <chrisj@rtems.org>

        * libcsupport/Makefile.am: Add mount-mgr.c.
        * libcsupport/src/mount-mgr.c: New.
        * include/rtems/fs.h: Added rtems_filesystem_location_mount.
        * libcsupport/include/rtems/libio.h, libcsupport/src/mount.c: New
        mount interface. It is similar to Linux.
        * libcsupport/include/rtems/libio_.h: Remove the
        init_fs_mount_table call.
        * libcsupport/src/base_fs.c: Remove init_fs_mount_table_call. Use
        the new mount call. Remove setting the root node in the global
        pathloc. Mount does this now.
        * libcsupport/src/privateenv.c: Remove the hack to set the root
        mount table entry in the environment.
        * libcsupport/src/unmount.cL Free the target string.
        * libblock/src/bdpart-mount.c: New mount API.

        * libfs/src/devfs/devfs.h, libfs/src/devfs/devfs_init.c,
        libfs/src/dosfs/dosfs.h, libfs/src/dosfs/msdos.h,
        libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs.h,
        libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_init.c,
        libfs/src/imfs/miniimfs_init.c,
        libfs/src/nfsclient/src/librtemsNfs.h,
        libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs.h,
        libnetworking/lib/ftpfs.c, libnetworking/rtems/ftpfs.h,
        libnetworking/rtems/tftp.h: New mount_h API.

        * libfs/src/devfs/devfs_eval.c: Local include of extern ops.
        * libfs/src/nfsclient/src/nfs.c: New mount API. Removed the mount
        me call and fixed the initialisation to happen when mounting.

        * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Remove mount
        filesystem files.

        * libmisc/fsmount/fsmount.c, libmisc/fsmount/fsmount.h: Updated to
        the new mount table values.

        * libmisc/shell/main_mount_ftp.c,
        libmisc/shell/main_mount_msdos.c, libmisc/shell/main_mount_rfs.c,
        libmisc/shell/main_mount_tftp.c: Removed.

        * libmisc/shell/main_mount.c: Use the new mount API. Also access
        the file system table for the file system types.

        * libnetworking/lib/tftpDriver.c: Updated to the new mount
        API. Fixed to allow mounting from any mount point. Also can now
        have more than file system mounted.

        * sapi/include/confdefs.h: Add file system configuration support.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2338&r2=text&tr2=1.2339&diff_format=h">M</a></td><td width='1%'>1.2339</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/include/rtems/fs.h.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>cpukit/include/rtems/fs.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libblock/src/bdpart-mount.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>cpukit/libblock/src/bdpart-mount.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/Makefile.am.diff?r1=text&tr1=1.117&r2=text&tr2=1.118&diff_format=h">M</a></td><td width='1%'>1.118</td><td width='100%'>cpukit/libcsupport/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/include/rtems/libio.h.diff?r1=text&tr1=1.61&r2=text&tr2=1.62&diff_format=h">M</a></td><td width='1%'>1.62</td><td width='100%'>cpukit/libcsupport/include/rtems/libio.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/include/rtems/libio_.h.diff?r1=text&tr1=1.33&r2=text&tr2=1.34&diff_format=h">M</a></td><td width='1%'>1.34</td><td width='100%'>cpukit/libcsupport/include/rtems/libio_.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/base_fs.c.diff?r1=text&tr1=1.21&r2=text&tr2=1.22&diff_format=h">M</a></td><td width='1%'>1.22</td><td width='100%'>cpukit/libcsupport/src/base_fs.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/mount-mgr.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">cpukit/libcsupport/src/mount-mgr.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/mount.c.diff?r1=text&tr1=1.32&r2=text&tr2=1.33&diff_format=h">M</a></td><td width='1%'>1.33</td><td width='100%'>cpukit/libcsupport/src/mount.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/privateenv.c.diff?r1=text&tr1=1.11&r2=text&tr2=1.12&diff_format=h">M</a></td><td width='1%'>1.12</td><td width='100%'>cpukit/libcsupport/src/privateenv.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/unmount.c.diff?r1=text&tr1=1.24&r2=text&tr2=1.25&diff_format=h">M</a></td><td width='1%'>1.25</td><td width='100%'>cpukit/libcsupport/src/unmount.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/devfs/devfs.h.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>cpukit/libfs/src/devfs/devfs.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/devfs/devfs_eval.c.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>cpukit/libfs/src/devfs/devfs_eval.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/devfs/devfs_init.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>cpukit/libfs/src/devfs/devfs_init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/dosfs/dosfs.h.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>cpukit/libfs/src/dosfs/dosfs.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/dosfs/msdos.h.diff?r1=text&tr1=1.23&r2=text&tr2=1.24&diff_format=h">M</a></td><td width='1%'>1.24</td><td width='100%'>cpukit/libfs/src/dosfs/msdos.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/dosfs/msdos_init.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</td><td width='100%'>cpukit/libfs/src/dosfs/msdos_init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs.h.diff?r1=text&tr1=1.40&r2=text&tr2=1.41&diff_format=h">M</a></td><td width='1%'>1.41</td><td width='100%'>cpukit/libfs/src/imfs/imfs.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_eval.c.diff?r1=text&tr1=1.25&r2=text&tr2=1.26&diff_format=h">M</a></td><td width='1%'>1.26</td><td width='100%'>cpukit/libfs/src/imfs/imfs_eval.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_init.c.diff?r1=text&tr1=1.16&r2=text&tr2=1.17&diff_format=h">M</a></td><td width='1%'>1.17</td><td width='100%'>cpukit/libfs/src/imfs/imfs_init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/miniimfs_init.c.diff?r1=text&tr1=1.13&r2=text&tr2=1.14&diff_format=h">M</a></td><td width='1%'>1.14</td><td width='100%'>cpukit/libfs/src/imfs/miniimfs_init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/nfsclient/src/librtemsNfs.h.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>cpukit/libfs/src/nfsclient/src/librtemsNfs.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/nfsclient/src/nfs.c.diff?r1=text&tr1=1.20&r2=text&tr2=1.21&diff_format=h">M</a></td><td width='1%'>1.21</td><td width='100%'>cpukit/libfs/src/nfsclient/src/nfs.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-rtems.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs.h.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/Makefile.am.diff?r1=text&tr1=1.84&r2=text&tr2=1.85&diff_format=h">M</a></td><td width='1%'>1.85</td><td width='100%'>cpukit/libmisc/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/fsmount/fsmount.h.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>cpukit/libmisc/fsmount/fsmount.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/fsmount/fsmount.c.diff?r1=text&tr1=1.11&r2=text&tr2=1.12&diff_format=h">M</a></td><td width='1%'>1.12</td><td width='100%'>cpukit/libmisc/fsmount/fsmount.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/shell/main_mount.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>cpukit/libmisc/shell/main_mount.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/shell/main_mount_ftp.c?rev=1.3&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.3</font></td><td width='100%'><font color="#880000">cpukit/libmisc/shell/main_mount_ftp.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/shell/main_mount_msdos.c?rev=1.2&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.2</font></td><td width='100%'><font color="#880000">cpukit/libmisc/shell/main_mount_msdos.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/shell/main_mount_rfs.c?rev=1.1&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.1</font></td><td width='100%'><font color="#880000">cpukit/libmisc/shell/main_mount_rfs.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/shell/main_mount_tftp.c?rev=1.2&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.2</font></td><td width='100%'><font color="#880000">cpukit/libmisc/shell/main_mount_tftp.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/shell/shellconfig.h.diff?r1=text&tr1=1.26&r2=text&tr2=1.27&diff_format=h">M</a></td><td width='1%'>1.27</td><td width='100%'>cpukit/libmisc/shell/shellconfig.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libnetworking/lib/ftpfs.c.diff?r1=text&tr1=1.28&r2=text&tr2=1.29&diff_format=h">M</a></td><td width='1%'>1.29</td><td width='100%'>cpukit/libnetworking/lib/ftpfs.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libnetworking/lib/tftpDriver.c.diff?r1=text&tr1=1.37&r2=text&tr2=1.38&diff_format=h">M</a></td><td width='1%'>1.38</td><td width='100%'>cpukit/libnetworking/lib/tftpDriver.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libnetworking/rtems/ftpfs.h.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>cpukit/libnetworking/rtems/ftpfs.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libnetworking/rtems/tftp.h.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>cpukit/libnetworking/rtems/tftp.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/sapi/include/confdefs.h.diff?r1=text&tr1=1.132&r2=text&tr2=1.133&diff_format=h">M</a></td><td width='1%'>1.133</td><td width='100%'>cpukit/sapi/include/confdefs.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2338 rtems/cpukit/ChangeLog:1.2339
--- rtems/cpukit/ChangeLog:1.2338       Sat May 29 00:17:11 2010
+++ rtems/cpukit/ChangeLog      Mon May 31 08:56:35 2010
</font><font color='#997700'>@@ -1,3 +1,53 @@
</font><font color='#000088'>+2010-05-31    Chris Johns <chrisj@rtems.org>
+
+       * libcsupport/Makefile.am: Add mount-mgr.c.
+       * libcsupport/src/mount-mgr.c: New.
+       * include/rtems/fs.h: Added rtems_filesystem_location_mount.
+       * libcsupport/include/rtems/libio.h, libcsupport/src/mount.c: New
+       mount interface. It is similar to Linux.
+       * libcsupport/include/rtems/libio_.h: Remove the
+       init_fs_mount_table call.
+       * libcsupport/src/base_fs.c: Remove init_fs_mount_table_call. Use
+       the new mount call. Remove setting the root node in the global
+       pathloc. Mount does this now.
+       * libcsupport/src/privateenv.c: Remove the hack to set the root
+       mount table entry in the environment.
+       * libcsupport/src/unmount.cL Free the target string.
+       * libblock/src/bdpart-mount.c: New mount API.
+<span style="background-color: #FF0000">       </span>
+       * libfs/src/devfs/devfs.h, libfs/src/devfs/devfs_init.c,
+       libfs/src/dosfs/dosfs.h, libfs/src/dosfs/msdos.h,
+       libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs.h,
+       libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_init.c,
+       libfs/src/imfs/miniimfs_init.c,
+       libfs/src/nfsclient/src/librtemsNfs.h,
+       libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs.h,
+       libnetworking/lib/ftpfs.c, libnetworking/rtems/ftpfs.h,
+       libnetworking/rtems/tftp.h: New mount_h API.
+<span style="background-color: #FF0000">       </span>
+       * libfs/src/devfs/devfs_eval.c: Local include of extern ops.
+       * libfs/src/nfsclient/src/nfs.c: New mount API. Removed the mount
+       me call and fixed the initialisation to happen when mounting.
+<span style="background-color: #FF0000">       </span>
+       * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Remove mount
+       filesystem files.
+
+       * libmisc/fsmount/fsmount.c, libmisc/fsmount/fsmount.h: Updated to
+       the new mount table values.
+<span style="background-color: #FF0000">       </span>
+       * libmisc/shell/main_mount_ftp.c,
+       libmisc/shell/main_mount_msdos.c, libmisc/shell/main_mount_rfs.c,
+       libmisc/shell/main_mount_tftp.c: Removed.
+
+       * libmisc/shell/main_mount.c: Use the new mount API. Also access
+       the file system table for the file system types.
+
+       * libnetworking/lib/tftpDriver.c: Updated to the new mount
+       API. Fixed to allow mounting from any mount point. Also can now
+       have more than file system mounted.
+<span style="background-color: #FF0000">       </span>
+       * sapi/include/confdefs.h: Add file system configuration support.
+
</font> 2010-05-29        Ralf Corsépius <ralf.corsepius@rtems.org>
 
        PR 1531/newlib:

<font color='#006600'>diff -u rtems/cpukit/include/rtems/fs.h:1.6 rtems/cpukit/include/rtems/fs.h:1.7
--- rtems/cpukit/include/rtems/fs.h:1.6 Sun Nov 29 05:52:51 2009
+++ rtems/cpukit/include/rtems/fs.h     Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -52,6 +52,11 @@
</font>    rtems_filesystem_mount_table_entry_t    *mt_entry;
 };
 
<font color='#000088'>+/*
+ * Return the mount table entry for a path location.
+ */
+#define rtems_filesystem_location_mount(_pl) ((_pl)->mt_entry)
+
</font> #ifdef __cplusplus
 }
 #endif

<font color='#006600'>diff -u rtems/cpukit/libblock/src/bdpart-mount.c:1.1 rtems/cpukit/libblock/src/bdpart-mount.c:1.2
--- rtems/cpukit/libblock/src/bdpart-mount.c:1.1        Fri Apr 30 03:42:12 2010
+++ rtems/cpukit/libblock/src/bdpart-mount.c    Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -29,7 +29,6 @@
</font> 
 #include <rtems.h>
 #include <rtems/bdpart.h>
<font color='#880000'>-#include <rtems/dosfs.h>
</font> #include <rtems/fsmount.h>
 
 rtems_status_code rtems_bdpart_mount(
<font color='#997700'>@@ -99,11 +98,11 @@
</font> 
     /* Mount */
     rv = mount(
<font color='#880000'>-      NULL,
-      &msdos_ops,
-      0,
</font>       logical_disk_name,
<font color='#880000'>-      mount_point
</font><font color='#000088'>+      mount_point,
+      "msdos",
+      0,
+      NULL
</font>     );
     if (rv != 0) {
       rmdir( mount_point);

<font color='#006600'>diff -u rtems/cpukit/libcsupport/Makefile.am:1.117 rtems/cpukit/libcsupport/Makefile.am:1.118
--- rtems/cpukit/libcsupport/Makefile.am:1.117  Fri Apr 30 23:19:00 2010
+++ rtems/cpukit/libcsupport/Makefile.am        Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -44,7 +44,7 @@
</font>     src/assocremotebylocal.c src/assocremotebyname.c
 
 BASE_FS_C_FILES = src/base_fs.c src/mount.c src/unmount.c src/libio.c \
<font color='#880000'>-    src/libio_init.c \
</font><font color='#000088'>+    src/mount-mgr.c src/libio_init.c \
</font>     src/libio_sockets.c src/eval.c src/fs_null_handlers.c src/privateenv.c \
     src/open_dev_console.c src/__usrenv.c
 

<font color='#006600'>diff -u rtems/cpukit/libcsupport/include/rtems/libio.h:1.61 rtems/cpukit/libcsupport/include/rtems/libio.h:1.62
--- rtems/cpukit/libcsupport/include/rtems/libio.h:1.61 Thu May 27 11:30:32 2010
+++ rtems/cpukit/libcsupport/include/rtems/libio.h      Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -209,23 +209,24 @@
</font> );
 
 typedef int (* rtems_filesystem_mount_t ) (
<font color='#880000'>-   rtems_filesystem_mount_table_entry_t *mt_entry     /* in */
</font><font color='#000088'>+   rtems_filesystem_mount_table_entry_t *mt_entry     /* IN */
</font> );
 
 typedef int (* rtems_filesystem_fsmount_me_t )(
<font color='#880000'>-   rtems_filesystem_mount_table_entry_t *mt_entry
</font><font color='#000088'>+  rtems_filesystem_mount_table_entry_t *mt_entry,     /* IN */
+  const void                           *data          /* IN */
</font> );
 
 typedef int (* rtems_filesystem_unmount_t ) (
<font color='#880000'>-   rtems_filesystem_mount_table_entry_t *mt_entry     /* in */
</font><font color='#000088'>+  rtems_filesystem_mount_table_entry_t *mt_entry     /* IN */
</font> );
 
 typedef int (* rtems_filesystem_fsunmount_me_t ) (
<font color='#880000'>-   rtems_filesystem_mount_table_entry_t *mt_entry    /* in */
</font><font color='#000088'>+   rtems_filesystem_mount_table_entry_t *mt_entry    /* IN */
</font> );
 
 typedef rtems_filesystem_node_types_t (* rtems_filesystem_node_type_t) (
<font color='#880000'>-  rtems_filesystem_location_info_t    *pathloc      /* in */
</font><font color='#000088'>+  rtems_filesystem_location_info_t    *pathloc      /* IN */
</font> );
 
 typedef int (* rtems_filesystem_utime_t)(
<font color='#997700'>@@ -291,6 +292,62 @@
</font>     rtems_filesystem_statvfs_t       statvfs_h;
 };
 
<font color='#000088'>+/*
+ * File system table used by mount to manage file systems.
+ */
+typedef struct _rtems_filesystem_table {
+  const char                    *type;
+  rtems_filesystem_fsmount_me_t  mount_h;
+} rtems_filesystem_table_t;
+
+/*
+ * File system table runtime loaded nodes.
+ */
+typedef struct _rtems_filesystem_table_node {
+  rtems_chain_node         node;
+  rtems_filesystem_table_t entry;
+} rtems_filesystem_table_node_t;
+
+/*
+ * Get the first entry in the filesystem table.
+ */
+const rtems_filesystem_table_t* rtems_filesystem_table_first( void );
+
+/*
+ * Get the next entry in the file system table.
+ */
+const rtems_filesystem_table_t*<span style="background-color: #FF0000"> </span>
+rtems_filesystem_table_next( rtems_filesystem_table_t *entry );
+
+/*
+ * Get the first entry in the mount table.
+ */
+rtems_filesystem_mount_table_entry_t*
+rtems_filesystem_mounts_first( void );
+
+/*
+ * Get the next entry in the mount table.
+ */
+rtems_filesystem_mount_table_entry_t*
+rtems_filesystem_mounts_next( rtems_filesystem_mount_table_entry_t *entry );
+
+/*
+ * Register a file system.
+ */
+int
+rtems_filesystem_register(
+  const char                    *type,
+  rtems_filesystem_fsmount_me_t  mount_h
+);
+
+/*
+ * Unregister a file system.
+ */
+int
+rtems_filesystem_unregister(
+  const char *type
+);
+
</font> #if 0
 /* Now in exec/include/rtems/fs.h */
 
<font color='#997700'>@@ -313,21 +370,26 @@
</font>  */
 
 typedef struct {
<font color='#880000'>-  int    link_max;
-  int    max_canon;
-  int    max_input;
-  int    name_max;
-  int    path_max;
-  int    pipe_buf;
-  int    posix_async_io;
-  int    posix_chown_restrictions;
-  int    posix_no_trunc;
-  int    posix_prio_io;
-  int    posix_sync_io;
-  int    posix_vdisable;
</font><font color='#000088'>+  int    link_max;                 /* count */
+  int    max_canon;                /* max formatted input line size */
+  int    max_input;                /* max input line size */
+  int    name_max;                 /* max name length */
+  int    path_max;                 /* max path */
+  int    pipe_buf;                 /* pipe buffer size */
+  int    posix_async_io;           /* async IO supported on fs, 0=no, 1=yes */
+  int    posix_chown_restrictions; /* can chown: 0=no, 1=yes */
+  int    posix_no_trunc;           /* error on names > max name, 0=no, 1=yes */
+  int    posix_prio_io;            /* priority IO, 0=no, 1=yes */
+  int    posix_sync_io;            /* file can be sync'ed, 0=no, 1=yes */
+  int    posix_vdisable;           /* special char processing, 0=no, 1=yes */
</font> } rtems_filesystem_limits_and_options_t;
 
 /*
<font color='#000088'>+ * Default pathconf settings. Override in a filesystem.
+ */
+extern const rtems_filesystem_limits_and_options_t rtems_filesystem_default_pathconf;
+
+/*
</font>  * Structure for a mount table entry.
  */
 
<font color='#997700'>@@ -341,6 +403,16 @@
</font>   rtems_filesystem_limits_and_options_t  pathconf_limits_and_options;
 
   /*
<font color='#000088'>+   * The target or mount point of the file system.
+   */
+  const char                            *target;
+
+  /*
+   * The type of filesystem or the name of the filesystem.
+   */
+  const char                            *type;
+
+  /*
</font>    *  When someone adds a mounted filesystem on a real device,
    *  this will need to be used.
    *
<font color='#997700'>@@ -350,6 +422,26 @@
</font>   char                                  *dev;
 };
 
<font color='#000088'>+/**
+ * The pathconf setting for a file system.
+ */
+#define rtems_filesystem_pathconf(_mte) ((_mte)->pathconf_limits_and_options)
+
+/**
+ * The type of file system. Its name.
+ */
+#define rtems_filesystem_type(_mte) ((_mte)->type)
+
+/**
+ * The mount point of a file system.
+ */
+#define rtems_filesystem_mount_point(_mte) ((_mte)->target)
+
+/**
+ * The device entry of a file system.
+ */
+#define rtems_filesystem_mount_device(_mte) ((_mte)->dev)
+
</font> /*
  *  Valid RTEMS file systems options
  */
<font color='#997700'>@@ -637,11 +729,11 @@
</font> );
 
 int mount(
<font color='#880000'>-  rtems_filesystem_mount_table_entry_t    **mt_entry,
-  const rtems_filesystem_operations_table  *fs_ops,
-  rtems_filesystem_options_t                fsoptions,
-  const char                               *device,
-  const char                               *mount_point
</font><font color='#000088'>+  const char                 *source,
+  const char                 *target,
+  const char                 *filesystemtype,
+  rtems_filesystem_options_t options,
+  const void                 *data
</font> );
 
 /*
<font color='#997700'>@@ -649,7 +741,7 @@
</font>  */
 
 typedef struct {
<font color='#880000'>-  const rtems_filesystem_operations_table *fs_ops;
</font><font color='#000088'>+  const char                              *type;
</font>   rtems_filesystem_options_t               fsoptions;
   const char                              *device;
   const char                              *mount_point;

<font color='#006600'>diff -u rtems/cpukit/libcsupport/include/rtems/libio_.h:1.33 rtems/cpukit/libcsupport/include/rtems/libio_.h:1.34
--- rtems/cpukit/libcsupport/include/rtems/libio_.h:1.33        Thu May 27 11:29:37 2010
+++ rtems/cpukit/libcsupport/include/rtems/libio_.h     Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -271,8 +271,6 @@
</font> 
 void rtems_filesystem_initialize(void);
 
<font color='#880000'>-int init_fs_mount_table(void);
-
</font> #ifdef __cplusplus
 }
 #endif

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/base_fs.c:1.21 rtems/cpukit/libcsupport/src/base_fs.c:1.22
--- rtems/cpukit/libcsupport/src/base_fs.c:1.21 Wed Oct 14 11:21:28 2009
+++ rtems/cpukit/libcsupport/src/base_fs.c      Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -36,7 +36,6 @@
</font> void rtems_filesystem_initialize( void )
 {
   int                                   status;
<font color='#880000'>-  rtems_filesystem_mount_table_entry_t *entry;
</font>   const rtems_filesystem_mount_table_t *mt;
   rtems_filesystem_location_info_t      loc;
 
<font color='#997700'>@@ -46,9 +45,6 @@
</font> 
   rtems_filesystem_umask = 022;
 
<font color='#880000'>-
-  init_fs_mount_table();
-
</font>   /*
    *  mount the first filesystem.
    */
<font color='#997700'>@@ -58,8 +54,7 @@
</font> 
   mt = &rtems_filesystem_mount_table[0];
 
<font color='#880000'>-  status = mount(
-     &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
</font><font color='#000088'>+  status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
</font> 
   if ( status == -1 )
     rtems_fatal_error_occurred( 0xABCD0002 );
<font color='#997700'>@@ -86,7 +81,6 @@
</font>    *
    *       Till Straumann, 10/25/2002
    */
<font color='#880000'>-  rtems_filesystem_root        = entry->mt_fs_root;
</font>   /* Clone the root pathloc */
   rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
   rtems_filesystem_root        = loc;

<font color='#006600'>diff -u /dev/null rtems/cpukit/libcsupport/src/mount-mgr.c:1.1
--- /dev/null   Mon May 31 09:11:08 2010
+++ rtems/cpukit/libcsupport/src/mount-mgr.c    Mon May 31 09:03:41 2010
</font><font color='#997700'>@@ -0,0 +1,187 @@
</font><font color='#000088'>+/*
+ *  mount()
+ *
+ *  Mange the mount table. You can iterate on mounts and file systems, as well
+ *  as add and remove file systems not in the file system confiration table.
+ *
+ *  COPYRIGHT (c) Chris Johns <chrisj@rtems.org> 2010.
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <rtems/chain.h>
+#include <rtems/seterr.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include <rtems/libio_.h>
+
+/*
+ * External defined by confdefs.h or the user.
+ */
+extern const rtems_filesystem_table_t configuration_filesystem_table[];
+
+/*
+ * Points to a list of filesystems added at runtime.
+ */
+extern rtems_chain_control *rtems_filesystem_table;
+
+/*
+ * Mount table list.
+ */
+extern rtems_chain_control rtems_filesystem_mount_table_control;
+extern bool                rtems_filesystem_mount_table_control_init;
+
+/*
+ * Get the first entry in the filesystem table.
+ */
+const rtems_filesystem_table_t*
+rtems_filesystem_table_first(
+  void
+)
+{
+  /*
+   * We can assume this because it is the root file system.
+   */
+  return &configuration_filesystem_table[0];
+}
+
+/*
+ * Get the next entry in the file system table.
+ */
+const rtems_filesystem_table_t*
+rtems_filesystem_table_next(
+  rtems_filesystem_table_t *entry
+)
+{
+  const rtems_filesystem_table_t* fs;
+
+  fs = rtems_filesystem_table_first( );
+<span style="background-color: #FF0000">  </span>
+  while ( fs->type && ( fs != entry ) )
+    ++fs;
+<span style="background-color: #FF0000">  </span>
+  if ( fs->type ) {
+    ++fs;
+    if ( fs->type )
+      return fs;
+  }
+
+  if ( rtems_filesystem_table ) {
+    rtems_chain_node* node;
+    for (node = rtems_chain_first( rtems_filesystem_table );
+         !rtems_chain_is_tail( rtems_filesystem_table, node);
+         node = rtems_chain_next( node )) {
+      rtems_filesystem_table_node_t* tnode;
+      tnode = (rtems_filesystem_table_node_t*) node;
+      if ( entry == &tnode->entry ) {
+        node = rtems_chain_next( node );
+        if ( !rtems_chain_is_tail( rtems_filesystem_table, node ) ) {
+          tnode = (rtems_filesystem_table_node_t*) node;
+          return &tnode->entry;
+        }
+      }
+    }
+  }
+<span style="background-color: #FF0000">  </span>
+  return NULL;
+}
+
+/*
+ * Get the first entry in the mount table.
+ */
+rtems_filesystem_mount_table_entry_t*
+rtems_filesystem_mounts_first(
+  void
+)
+{
+  rtems_filesystem_mount_table_entry_t* entry = NULL;
+  if ( rtems_filesystem_mount_table_control_init ) {
+    if ( !rtems_chain_is_empty( &rtems_filesystem_mount_table_control ) )
+      entry = (rtems_filesystem_mount_table_entry_t*)
+        rtems_chain_first( &rtems_filesystem_mount_table_control );
+  }
+  return entry;
+}
+
+/*
+ * Get the next entry in the mount table.
+ */
+rtems_filesystem_mount_table_entry_t*
+rtems_filesystem_mounts_next(
+  rtems_filesystem_mount_table_entry_t *entry
+)
+{
+  if ( !rtems_filesystem_mount_table_control_init || !entry )
+    return NULL;
+  return (rtems_filesystem_mount_table_entry_t*) rtems_chain_next( &entry->Node );
+}
+
+/*
+ * Register a file system.
+ */
+int
+rtems_filesystem_register(
+  const char                    *type,
+  rtems_filesystem_fsmount_me_t  mount_h
+)
+{
+  rtems_filesystem_table_node_t *fs;
+  if ( !rtems_filesystem_table ) {
+    rtems_filesystem_table = malloc( sizeof( rtems_chain_control ) );
+    if ( !rtems_filesystem_table )
+      rtems_set_errno_and_return_minus_one( ENOMEM );
+    rtems_chain_initialize_empty ( rtems_filesystem_table );
+  }
+  fs = malloc( sizeof( rtems_filesystem_table_node_t ) );
+  if ( !fs )
+    rtems_set_errno_and_return_minus_one( ENOMEM );
+  fs->entry.type = strdup( type );
+  if ( !fs->entry.type ) {
+    free( fs );
+    rtems_set_errno_and_return_minus_one( ENOMEM );
+  }<span style="background-color: #FF0000">    </span>
+  fs->entry.mount_h = mount_h;
+  rtems_chain_append( rtems_filesystem_table, &fs->node );
+  return 0;
+}
+
+/*
+ * Unregister a file system.
+ */
+int
+rtems_filesystem_unregister(
+  const char *type
+)
+{
+  if ( rtems_filesystem_table ) {
+    rtems_chain_node *node;
+    for (node = rtems_chain_first( rtems_filesystem_table );
+         !rtems_chain_is_tail( rtems_filesystem_table, node );
+         node = rtems_chain_next( node ) ) {
+      rtems_filesystem_table_node_t *fs;
+      fs = (rtems_filesystem_table_node_t*) node;
+      if ( strcmp( fs->entry.type, type ) == 0 ) {
+        rtems_chain_extract( node );
+        free( (void*) fs->entry.type );
+        free( fs );
+        return 0;
+      }
+    }
+  }
+  rtems_set_errno_and_return_minus_one( ENOENT );
+}
</font>
<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/mount.c:1.32 rtems/cpukit/libcsupport/src/mount.c:1.33
--- rtems/cpukit/libcsupport/src/mount.c:1.32   Thu Jun 11 20:53:32 2009
+++ rtems/cpukit/libcsupport/src/mount.c        Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -33,24 +33,72 @@
</font> 
 #include <rtems/libio_.h>
 
<font color='#880000'>-rtems_chain_control rtems_filesystem_mount_table_control;
</font><font color='#000088'>+/*
+ * External defined by confdefs.h or the user.
+ */
+extern const rtems_filesystem_table_t configuration_filesystem_table[];
</font> 
 /*
<font color='#880000'>- *  Prototypes that probably should be somewhere else.
</font><font color='#000088'>+ * Points to a list of filesystems added at runtime.
</font>  */
<font color='#000088'>+rtems_chain_control *rtems_filesystem_table;
</font> 
<font color='#880000'>-int init_fs_mount_table( void );
-static bool Is_node_fs_root(
-  rtems_filesystem_location_info_t  *loc
-);
</font><font color='#000088'>+/*
+ * Mount table list.
+ */
+rtems_chain_control rtems_filesystem_mount_table_control;
+bool                rtems_filesystem_mount_table_control_init;
</font> 
<font color='#000088'>+/*
+ * Default pathconfs.
+ */
+const rtems_filesystem_limits_and_options_t rtems_filesystem_default_pathconf = {
+   5,    /* link_max: count */
+   128,  /* max_canon: max formatted input line size */
+   7,    /* max_input: max input line size */
+   255,  /* name_max: max name */
+   255,  /* path_max: max path */
+   1024, /* pipe_buf: pipe buffer size */
+   0,    /* posix_async_io: async IO supported on fs, 0=no, 1=yes */
+   0 ,   /* posix_chown_restrictions: can chown: 0=no, 1=yes */
+   1,    /* posix_no_trunc: error on filenames > max name, 0=no, 1=yes */
+   0,    /* posix_prio_io: priority IO, 0=no, 1=yes */
+   0,    /* posix_sync_io: file can be sync'ed, 0=no, 1=yes */
+   0     /* posix_vdisable: special char processing, 0=no, 1=yes */
+};
</font> 
 /*
<font color='#880000'>- *  XXX
</font><font color='#000088'>+ *  Is_node_fs_root
+ *
+ *  This routine will run through the entries that currently exist in the
+ *  mount table chain. For each entry in the mount table chain it will
+ *  compare the mount tables root node to the node describing the selected
+ *  mount point. If any match is found true is returned else false is
+ *  returned.
+ *
</font>  */
 
<font color='#880000'>-#define FOUND      0
-#define NOT_FOUND -1
</font><font color='#000088'>+static bool Is_node_fs_root(
+  rtems_filesystem_location_info_t  *loc
+)
+{
+  rtems_chain_node                     *the_node;
+  rtems_filesystem_mount_table_entry_t *the_mount_entry;
+
+  /*
+   * For each mount table entry
+   */
+  if ( rtems_filesystem_mount_table_control_init ) {
+    for ( the_node = rtems_chain_first( &rtems_filesystem_mount_table_control );
+          !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
+          the_node = rtems_chain_next( the_node ) ) {
+      the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node;
+      if ( the_mount_entry->mt_fs_root.node_access  == loc->node_access )
+        return true;
+    }
+  }
+  return false;
+}
</font> 
 /*
  *  mount
<font color='#997700'>@@ -68,27 +116,25 @@
</font>  */
 
 int mount(
<font color='#880000'>-  rtems_filesystem_mount_table_entry_t    **mt_entry,
-  const rtems_filesystem_operations_table  *fs_ops,
-  rtems_filesystem_options_t                options,
-  const char                               *device,
-  const char                               *mount_point
-)
</font><font color='#000088'>+  const char                 *source,
+  const char                 *target,
+  const char                 *filesystemtype,
+  rtems_filesystem_options_t options,
+  const void                 *data
+          )
</font> {
<font color='#000088'>+  const rtems_filesystem_table_t       *entry;
</font>   rtems_filesystem_location_info_t      loc;
<font color='#880000'>-  rtems_filesystem_mount_table_entry_t *temp_mt_entry = NULL;
</font><font color='#000088'>+  rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
</font>   rtems_filesystem_location_info_t     *loc_to_free = NULL;
   size_t size;
 
<font color='#880000'>-/* XXX add code to check for required operations */
-
</font>   /*
<font color='#880000'>-   *  Is there a file system operations table?
</font><font color='#000088'>+   * If mount is ever called we allocate the mount table control structure.
</font>    */
<font color='#880000'>-
-  if ( fs_ops == NULL ) {
-    errno = EINVAL;
-    return -1;
</font><font color='#000088'>+  if ( !rtems_filesystem_mount_table_control_init ) {
+    rtems_filesystem_mount_table_control_init = true;
+    rtems_chain_initialize_empty ( &rtems_filesystem_mount_table_control );
</font>   }
 
   /*
<font color='#997700'>@@ -101,45 +147,88 @@
</font>     return -1;
   }
 
<font color='#880000'>-  /* Do they support being mounted at all ? */
-  if ( !fs_ops->fsmount_me_h ) {
-    errno = ENOTSUP;
-    goto cleanup_and_bail;
</font><font color='#000088'>+  /*
+   * Check the type.
+   */
+  if (!filesystemtype) {
+    errno = EINVAL;
+    return -1;
</font>   }
 
<font color='#000088'>+  if (strlen(filesystemtype) >= 128) {
+    errno = EINVAL;
+    return -1;
+  }
+<span style="background-color: #FF0000">    </span>
+  /*
+   * Check the configuration table filesystems then check any runtime added
+   * file systems.
+   */
+  entry = &configuration_filesystem_table[0];
+  while (entry->type) {
+    if (strcmp (filesystemtype, entry->type) == 0)
+      break;
+    ++entry;
+  }
+<span style="background-color: #FF0000">  </span>
+  if (!entry->type) {
+    entry = NULL;
+    if (rtems_filesystem_table) {
+      rtems_chain_node *the_node;
+      for (the_node = rtems_chain_first(rtems_filesystem_table);
+           !rtems_chain_is_tail(rtems_filesystem_table, the_node);
+           the_node = rtems_chain_next(the_node)) {
+        entry = &(((rtems_filesystem_table_node_t*) the_node)->entry);
+        if (strcmp (filesystemtype, entry->type) == 0)
+          break;
+        entry = NULL;
+      }
+    }
+  }
</font> 
<font color='#000088'>+  if (!entry)
+  {
+    errno = EINVAL;
+    return -1;
+  }
+<span style="background-color: #FF0000">  </span>
</font>   /*
    * Allocate a mount table entry
    */
 
<font color='#880000'>-   size = sizeof(rtems_filesystem_mount_table_entry_t);
-   if ( device )
-     size += strlen( device ) + 1;
-   temp_mt_entry = malloc( size );
-
-   if ( !temp_mt_entry ) {
-     errno = ENOMEM;
-     return -1;
-   }
-
-   temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
-   temp_mt_entry->options = options;
-   if ( device ) {
-     temp_mt_entry->dev =
-       (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
-     strcpy( temp_mt_entry->dev, device );
-   } else
-     temp_mt_entry->dev = 0;
</font><font color='#000088'>+  size = sizeof(rtems_filesystem_mount_table_entry_t);
+  if ( source )
+    size += strlen( source ) + 1;
+<span style="background-color: #FF0000">   </span>
+  mt_entry = malloc( size );
+  if ( !mt_entry ) {
+    errno = ENOMEM;
+    return -1;
+  }
+
+  memset( mt_entry, 0, size );
+<span style="background-color: #FF0000">   </span>
+  mt_entry->mt_fs_root.mt_entry = mt_entry;
+  mt_entry->type = entry->type;
+  mt_entry->options = options;
+  mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
+<span style="background-color: #FF0000">   </span>
+  if ( source ) {
+    mt_entry->dev =
+      (char *)mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
+    strcpy( mt_entry->dev, source );
+  } else
+    mt_entry->dev = 0;
</font> 
   /*
    *  The mount_point should be a directory with read/write/execute
    *  permissions in the existing tree.
    */
 
<font color='#880000'>-  if ( mount_point ) {
</font><font color='#000088'>+  if ( target ) {
</font> 
     if ( rtems_filesystem_evaluate_path(
<font color='#880000'>-           mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
</font><font color='#000088'>+           target, strlen( target ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
</font>       goto cleanup_and_bail;
 
     loc_to_free = &loc;
<font color='#997700'>@@ -179,11 +268,11 @@
</font>      *  traverse the tree.
      */
 
<font color='#880000'>-    temp_mt_entry->mt_point_node.node_access = loc.node_access;
-    temp_mt_entry->mt_point_node.handlers = loc.handlers;
-    temp_mt_entry->mt_point_node.ops = loc.ops;
-    temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
-
</font><font color='#000088'>+    mt_entry->mt_point_node.node_access = loc.node_access;
+    mt_entry->mt_point_node.handlers = loc.handlers;
+    mt_entry->mt_point_node.ops = loc.ops;
+    mt_entry->mt_point_node.mt_entry = loc.mt_entry;
+<span style="background-color: #FF0000">      </span>
</font>     /*
      *  This link to the parent is only done when we are dealing with system
      *  below the base file system
<font color='#997700'>@@ -194,31 +283,45 @@
</font>       goto cleanup_and_bail;
     }
 
<font color='#880000'>-    if ( loc.ops->mount_h( temp_mt_entry ) ) {
</font><font color='#000088'>+    if ( loc.ops->mount_h( mt_entry ) ) {
</font>       goto cleanup_and_bail;
     }
<font color='#000088'>+
+    mt_entry->target = strdup( target );
</font>   } else {
 
     /*
<font color='#000088'>+     * Do we already have a base file system ?
+     */
+    if ( !rtems_chain_is_empty( &rtems_filesystem_mount_table_control ) ) {
+      errno = EINVAL;
+      goto cleanup_and_bail;
+    }
+<span style="background-color: #FF0000">    </span>
+    /*
</font>      *  This is a mount of the base file system --> The
      *  mt_point_node.node_access will be set to null to indicate that this
      *  is the root of the entire file system.
      */
 
<font color='#880000'>-    temp_mt_entry->mt_fs_root.node_access = NULL;
-    temp_mt_entry->mt_fs_root.handlers = NULL;
-    temp_mt_entry->mt_fs_root.ops = NULL;
-
-    temp_mt_entry->mt_point_node.node_access = NULL;
-    temp_mt_entry->mt_point_node.handlers = NULL;
-    temp_mt_entry->mt_point_node.ops = NULL;
-    temp_mt_entry->mt_point_node.mt_entry = NULL;
</font><font color='#000088'>+    mt_entry->mt_fs_root.node_access = NULL;
+    mt_entry->mt_fs_root.handlers = NULL;
+    mt_entry->mt_fs_root.ops = NULL;
+
+    mt_entry->mt_point_node.node_access = NULL;
+    mt_entry->mt_point_node.handlers = NULL;
+    mt_entry->mt_point_node.ops = NULL;
+    mt_entry->mt_point_node.mt_entry = NULL;
+
+    mt_entry->target = "/";
</font>   }
 
<font color='#880000'>-  if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
-       /* try to undo the mount operation */
-       if ( loc.ops->unmount_h ) {
-               loc.ops->unmount_h( temp_mt_entry );
</font><font color='#000088'>+  if ( entry->mount_h( mt_entry, data ) ) {
+    /*
+     * Try to undo the mount operation
+     */
+    if ( loc.ops->unmount_h ) {
+      loc.ops->unmount_h( mt_entry );
</font>     }
     goto cleanup_and_bail;
   }
<font color='#997700'>@@ -226,18 +329,18 @@
</font>   /*
    *  Add the mount table entry to the mount table chain
    */
<font color='#880000'>-
</font>   rtems_chain_append( &rtems_filesystem_mount_table_control,
<font color='#880000'>-                      &temp_mt_entry->Node );
</font><font color='#000088'>+                      &mt_entry->Node );
</font> 
<font color='#880000'>-  if ( mt_entry )
-    *mt_entry = temp_mt_entry;
</font><font color='#000088'>+  if ( !target )
+    rtems_filesystem_root = mt_entry->mt_fs_root;
</font> 
   return 0;
 
 cleanup_and_bail:
 
<font color='#880000'>-  free( temp_mt_entry );
</font><font color='#000088'>+  free( (void*) mt_entry->target );
+  free( mt_entry );
</font> 
   if ( loc_to_free )
     rtems_filesystem_freenode( loc_to_free );
<font color='#997700'>@@ -245,49 +348,3 @@
</font>   return -1;
 }
 
<font color='#880000'>-
-
-/*
- *  init_fs_mount_table
- *
- *  This routine will initialize the chain control element that manages the
- *  mount table chain.
- */
-
-int init_fs_mount_table(void)
-{
-  rtems_chain_initialize_empty ( &rtems_filesystem_mount_table_control );
-  return 0;
-}
-
-/*
- *  Is_node_fs_root
- *
- *  This routine will run through the entries that currently exist in the
- *  mount table chain. For each entry in the mount table chain it will
- *  compare the mount tables root node to the node describing the selected
- *  mount point. If any match is found true is returned else false is
- *  returned.
- *
- */
-
-static bool Is_node_fs_root(
-  rtems_filesystem_location_info_t  *loc
-)
-{
-  rtems_chain_node                     *the_node;
-  rtems_filesystem_mount_table_entry_t *the_mount_entry;
-
-  /*
-   * For each mount table entry
-   */
-
-  for ( the_node = rtems_filesystem_mount_table_control.first;
-        !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
-        the_node = the_node->next ) {
-     the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node;
-     if ( the_mount_entry->mt_fs_root.node_access  == loc->node_access )
-        return true;
-  }
-  return false;
-}
</font>
<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/privateenv.c:1.11 rtems/cpukit/libcsupport/src/privateenv.c:1.12
--- rtems/cpukit/libcsupport/src/privateenv.c:1.11      Thu Jun 11 20:53:32 2009
+++ rtems/cpukit/libcsupport/src/privateenv.c   Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -1,5 +1,5 @@
</font> /*
<font color='#880000'>- *  Instantatiate a private user environment for the calling thread.
</font><font color='#000088'>+ *  Instantiate a private user environment for the calling thread.
</font>  *
  *  Submitted by: fernando.ruiz@ctv.es (correo@fernando-ruiz.com)
  *
<font color='#997700'>@@ -24,12 +24,6 @@
</font> #include <rtems/libio.h>
 #include <rtems/libio_.h>
 
<font color='#880000'>-extern rtems_chain_control rtems_filesystem_mount_table_control;
-
-#define THE_ROOT_FS_LOC \
-       (((rtems_filesystem_mount_table_entry_t*)\
-          rtems_filesystem_mount_table_control.first)->mt_fs_root)
-
</font> /* cleanup a user environment
  * NOTE: this must be called with
  *       thread dispatching disabled!
<font color='#997700'>@@ -82,13 +76,11 @@
</font>   *rtems_current_user_env = rtems_global_user_env; /* get the global values*/
   rtems_current_user_env->task_id=task_id;         /* mark the local values*/
 
<font color='#880000'>-  /* get a clean root */
-  rtems_filesystem_root    = THE_ROOT_FS_LOC;
-
</font>   /* Clone the pathlocs. In contrast to most other
    * code we must _not_ free the original locs because
    * what we are trying to do here is forking off
<font color='#880000'>-   * clones.
</font><font color='#000088'>+   * clones. The reason is a pathloc can be allocated by the
+   * file system and needs to be freed when deleting the environment.
</font>    */
 
   rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/unmount.c:1.24 rtems/cpukit/libcsupport/src/unmount.c:1.25
--- rtems/cpukit/libcsupport/src/unmount.c:1.24 Tue Sep 15 04:42:46 2009
+++ rtems/cpukit/libcsupport/src/unmount.c      Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -213,6 +213,7 @@
</font>    */
 
   rtems_filesystem_freenode( fs_mount_loc );
<font color='#000088'>+  free( (void*) mt_entry->target );
</font>   free( mt_entry );
 
   return 0;

<font color='#006600'>diff -u rtems/cpukit/libfs/src/devfs/devfs.h:1.6 rtems/cpukit/libfs/src/devfs/devfs.h:1.7
--- rtems/cpukit/libfs/src/devfs/devfs.h:1.6    Thu May 27 11:20:44 2010
+++ rtems/cpukit/libfs/src/devfs/devfs.h        Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -50,22 +50,6 @@
</font> 
 extern uint32_t rtems_device_table_size;
 
<font color='#880000'>-
-/**
- *  The following defines the device-only filesystem operating
- *  handlers.
- */
-
-extern rtems_filesystem_operations_table devFS_ops;
-
-/**
- *  The following defines the device-only filesystem operating
- *  handlers.
- */
-
-extern rtems_filesystem_file_handlers_r  devFS_file_handlers;
-
-
</font> /**
  *  This handler maps open operation to rtems_io_open.
  *  @param iop This is the RTEMS's internal representation of file.
<font color='#997700'>@@ -257,14 +241,16 @@
</font>  *  initializing it to a known state, and set device file operation
  *  handlers. After this, the device-only filesytem is ready for use
  *
<font color='#880000'>- *  @param  temp_mt_entry
</font><font color='#000088'>+ *  @param  mt_entry The filesystem mount table entry.
+ *  @param  data Filesystem specific data.
</font>  *  @retval upon success, this routine returns 0; otherwise it returns
  *  -1 and errno is set to proper value. The only error is when malloc
  *  failed, and errno is set to NOMEM.
  */
 
 extern int devFS_initialize(
<font color='#880000'>-  rtems_filesystem_mount_table_entry_t *temp_mt_entry
</font><font color='#000088'>+  rtems_filesystem_mount_table_entry_t *mt_entry,
+  const void                           *data
</font> );
 
 

<font color='#006600'>diff -u rtems/cpukit/libfs/src/devfs/devfs_eval.c:1.5 rtems/cpukit/libfs/src/devfs/devfs_eval.c:1.6
--- rtems/cpukit/libfs/src/devfs/devfs_eval.c:1.5       Thu May 27 11:20:44 2010
+++ rtems/cpukit/libfs/src/devfs/devfs_eval.c   Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -15,6 +15,20 @@
</font> #include <assert.h>
 #include "devfs.h"
 
<font color='#000088'>+/**
+ *  The following defines the device-only filesystem operating
+ *  handlers.
+ */
+
+extern rtems_filesystem_operations_table devFS_ops;
+
+/**
+ *  The following defines the device-only filesystem operating
+ *  handlers.
+ */
+
+extern rtems_filesystem_file_handlers_r  devFS_file_handlers;
+
</font> int devFS_evaluate_path(
   const char                        *pathname,
   size_t                             pathnamelen,

<font color='#006600'>diff -u rtems/cpukit/libfs/src/devfs/devfs_init.c:1.4 rtems/cpukit/libfs/src/devfs/devfs_init.c:1.5
--- rtems/cpukit/libfs/src/devfs/devfs_init.c:1.4       Sun Nov 29 07:18:56 2009
+++ rtems/cpukit/libfs/src/devfs/devfs_init.c   Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -59,7 +59,8 @@
</font> 
 
 int devFS_initialize(
<font color='#880000'>-  rtems_filesystem_mount_table_entry_t *temp_mt_entry
</font><font color='#000088'>+  rtems_filesystem_mount_table_entry_t *temp_mt_entry,
+  const void                           *data
</font> )
 {
   rtems_device_name_t  *device_name_table;

<font color='#006600'>diff -u rtems/cpukit/libfs/src/dosfs/dosfs.h:1.8 rtems/cpukit/libfs/src/dosfs/dosfs.h:1.9
--- rtems/cpukit/libfs/src/dosfs/dosfs.h:1.8    Sun Nov 29 07:18:56 2009
+++ rtems/cpukit/libfs/src/dosfs/dosfs.h        Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -25,7 +25,8 @@
</font> extern "C" {
 #endif
 
<font color='#880000'>-extern rtems_filesystem_operations_table  msdos_ops;
</font><font color='#000088'>+int rtems_dosfs_initialize(rtems_filesystem_mount_table_entry_t *mt_entry,
+                           const void                           *data);
</font> 
 #define MSDOS_FMT_FATANY 0
 #define MSDOS_FMT_FAT12  1

<font color='#006600'>diff -u rtems/cpukit/libfs/src/dosfs/msdos.h:1.23 rtems/cpukit/libfs/src/dosfs/msdos.h:1.24
--- rtems/cpukit/libfs/src/dosfs/msdos.h:1.23   Thu May 27 11:23:04 2010
+++ rtems/cpukit/libfs/src/dosfs/msdos.h        Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -223,8 +223,6 @@
</font> #define MSDOS_DPS512_NUM    16
 
 /* Prototypes */
<font color='#880000'>-int msdos_initialize(rtems_filesystem_mount_table_entry_t *temp_mt_entry);
-
</font> int msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry);
 
 int msdos_eval_path(

<font color='#006600'>diff -u rtems/cpukit/libfs/src/dosfs/msdos_init.c:1.10 rtems/cpukit/libfs/src/dosfs/msdos_init.c:1.11
--- rtems/cpukit/libfs/src/dosfs/msdos_init.c:1.10      Thu Mar  4 00:36:51 2010
+++ rtems/cpukit/libfs/src/dosfs/msdos_init.c   Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -16,6 +16,7 @@
</font> #endif
 
 #include <rtems/libio_.h>
<font color='#000088'>+#include "dosfs.h"
</font> #include "msdos.h"
 
 const rtems_filesystem_operations_table  msdos_ops = {
<font color='#997700'>@@ -28,7 +29,7 @@
</font>   .chown_h        =  NULL,
   .freenod_h      =  msdos_free_node_info,
   .mount_h        =  NULL,
<font color='#880000'>-  .fsmount_me_h   =  msdos_initialize,
</font><font color='#000088'>+  .fsmount_me_h   =  rtems_dosfs_initialize,
</font>   .unmount_h      =  NULL,
   .fsunmount_me_h =  msdos_shut_down,
   .utime_h        =  NULL,
<font color='#997700'>@@ -50,11 +51,12 @@
</font>  *     RC_OK on success, or -1 if error occured (errno set apropriately).
  *
  */
<font color='#880000'>-int msdos_initialize(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
</font><font color='#000088'>+int rtems_dosfs_initialize(rtems_filesystem_mount_table_entry_t *mt_entry,
+                           const void                           *data)
</font> {
     int rc;
 
<font color='#880000'>-    rc = msdos_initialize_support(temp_mt_entry,
</font><font color='#000088'>+    rc = msdos_initialize_support(mt_entry,
</font>                                   &msdos_ops,
                                   &msdos_file_handlers,
                                   &msdos_dir_handlers);

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs.h:1.40 rtems/cpukit/libfs/src/imfs/imfs.h:1.41
--- rtems/cpukit/libfs/src/imfs/imfs.h:1.40     Thu May 27 11:24:47 2010
+++ rtems/cpukit/libfs/src/imfs/imfs.h  Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -255,11 +255,13 @@
</font>  */
 
 extern int IMFS_initialize(
<font color='#880000'>-   rtems_filesystem_mount_table_entry_t *mt_entry
</font><font color='#000088'>+   rtems_filesystem_mount_table_entry_t *mt_entry,
+   const void                           *data
</font> );
 
 extern int miniIMFS_initialize(
<font color='#880000'>-   rtems_filesystem_mount_table_entry_t *mt_entry
</font><font color='#000088'>+   rtems_filesystem_mount_table_entry_t *mt_entry,
+   const void                           *data
</font> );
 
 extern int IMFS_initialize_support(

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.25 rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.26
--- rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.25        Thu May 27 11:24:47 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_eval.c     Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -490,7 +490,7 @@
</font>   size_t                             pathnamelen,  /* IN     */
   int                                flags,        /* IN     */
   rtems_filesystem_location_info_t  *pathloc       /* IN/OUT */
<font color='#880000'>-)
</font><font color='#000088'>+                   )
</font> {
   int                                 i = 0;
   int                                 len;
<font color='#997700'>@@ -531,40 +531,40 @@
</font>     if ( type != IMFS_NO_MORE_PATH )
       if ( node->type == IMFS_DIRECTORY )
         if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
<font color='#880000'>-           rtems_set_errno_and_return_minus_one( EACCES );
</font><font color='#000088'>+          rtems_set_errno_and_return_minus_one( EACCES );
</font> 
     node = pathloc->node_access;
 
     switch( type ) {
       case IMFS_UP_DIR:
<font color='#880000'>-       /*
-        *  Am I at the root of all filesystems? (chroot'ed?)
-       */
-
-       if ( pathloc->node_access == rtems_filesystem_root.node_access )
-         break;       /* Throw out the .. in this case */
-
-       /*
-        *  Am I at the root of this mounted filesystem?
-        */
</font><font color='#000088'>+        /*
+         *  Am I at the root of all filesystems? (chroot'ed?)
+         */
+
+        if ( pathloc->node_access == rtems_filesystem_root.node_access )
+          break;       /* Throw out the .. in this case */
+
+        /*
+         *  Am I at the root of this mounted filesystem?
+         */
</font> 
         if (pathloc->node_access ==
             pathloc->mt_entry->mt_fs_root.node_access) {
 
           /*
<font color='#880000'>-      *  Am I at the root of all filesystems?
-          */
</font><font color='#000088'>+           *  Am I at the root of all filesystems?
+           */
</font> 
           if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
             break;       /* Throw out the .. in this case */
<font color='#880000'>-     } else {
</font><font color='#000088'>+          } else {
</font>             newloc = pathloc->mt_entry->mt_point_node;
             *pathloc = newloc;
             return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
                                                pathnamelen+len,
                                                flags,pathloc);
<font color='#880000'>-     }
-       } else {
</font><font color='#000088'>+          }
+        } else {
</font> 
           if ( !node->Parent )
             rtems_set_errno_and_return_minus_one( ENOENT );
<font color='#997700'>@@ -572,17 +572,17 @@
</font>           node = node->Parent;
           pathloc->node_access = node;
 
<font color='#880000'>-   }
</font><font color='#000088'>+        }
</font> 
         pathloc->node_access = node;
         break;
 
       case IMFS_NAME:
<font color='#880000'>-   /*
-        *  If we are at a link follow it.
-        */
</font><font color='#000088'>+        /*
+         *  If we are at a link follow it.
+         */
</font> 
<font color='#880000'>-   if ( node->type == IMFS_HARD_LINK ) {
</font><font color='#000088'>+        if ( node->type == IMFS_HARD_LINK ) {
</font> 
           IMFS_evaluate_hard_link( pathloc, 0 );
 
<font color='#997700'>@@ -590,26 +590,26 @@
</font>           if ( !node )
             rtems_set_errno_and_return_minus_one( ENOTDIR );
 
<font color='#880000'>-   } else if ( node->type == IMFS_SYM_LINK ) {
</font><font color='#000088'>+        } else if ( node->type == IMFS_SYM_LINK ) {
</font> 
           result = IMFS_evaluate_sym_link( pathloc, 0 );
 
           node = pathloc->node_access;
           if ( result == -1 )
             return -1;
<font color='#880000'>-   }
</font><font color='#000088'>+        }
</font> 
<font color='#880000'>-       /*
-        *  Only a directory can be decended into.
-        */
</font><font color='#000088'>+        /*
+         *  Only a directory can be decended into.
+         */
</font> 
<font color='#880000'>-       if ( node->type != IMFS_DIRECTORY )
</font><font color='#000088'>+        if ( node->type != IMFS_DIRECTORY )
</font>           rtems_set_errno_and_return_minus_one( ENOTDIR );
 
<font color='#880000'>-   /*
-        *  If we are at a node that is a mount point. Set loc to the
-        *  new fs root node and let them finish evaluating the path.
-        */
</font><font color='#000088'>+        /*
+         *  If we are at a node that is a mount point. Set loc to the
+         *  new fs root node and let them finish evaluating the path.
+         */
</font> 
         if ( node->info.directory.mt_fs != NULL ) {
           newloc   = node->info.directory.mt_fs->mt_fs_root;
<font color='#997700'>@@ -617,19 +617,19 @@
</font>           return (*pathloc->ops->evalpath_h)( &pathname[i-len],
                                               pathnamelen+len,
                                               flags, pathloc );
<font color='#880000'>-   }
</font><font color='#000088'>+        }
</font> 
<font color='#880000'>-   /*
-        *  Otherwise find the token name in the present location.
-        */
</font><font color='#000088'>+        /*
+         *  Otherwise find the token name in the present location.
+         */
</font> 
         node = IMFS_find_match_in_dir( node, token );
         if ( !node )
           rtems_set_errno_and_return_minus_one( ENOENT );
 
<font color='#880000'>-   /*
-        *  Set the node access to the point we have found.
-        */
</font><font color='#000088'>+        /*
+         *  Set the node access to the point we have found.
+         */
</font> 
         pathloc->node_access = node;
         break;

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_init.c:1.16 rtems/cpukit/libfs/src/imfs/imfs_init.c:1.17
--- rtems/cpukit/libfs/src/imfs/imfs_init.c:1.16        Thu Mar  4 00:36:51 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_init.c     Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -59,7 +59,8 @@
</font>  */
 
 int IMFS_initialize(
<font color='#880000'>-  rtems_filesystem_mount_table_entry_t *temp_mt_entry
</font><font color='#000088'>+  rtems_filesystem_mount_table_entry_t *temp_mt_entry,
+  const void                           *data
</font> )
 {
    return IMFS_initialize_support(

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/miniimfs_init.c:1.13 rtems/cpukit/libfs/src/imfs/miniimfs_init.c:1.14
--- rtems/cpukit/libfs/src/imfs/miniimfs_init.c:1.13    Thu Mar  4 00:36:51 2010
+++ rtems/cpukit/libfs/src/imfs/miniimfs_init.c Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -59,7 +59,8 @@
</font>  */
 
 int miniIMFS_initialize(
<font color='#880000'>-  rtems_filesystem_mount_table_entry_t *temp_mt_entry
</font><font color='#000088'>+  rtems_filesystem_mount_table_entry_t *temp_mt_entry,
+  const void                           *data
</font> )
 {
     return IMFS_initialize_support(

<font color='#006600'>diff -u rtems/cpukit/libfs/src/nfsclient/src/librtemsNfs.h:1.4 rtems/cpukit/libfs/src/nfsclient/src/librtemsNfs.h:1.5
--- rtems/cpukit/libfs/src/nfsclient/src/librtemsNfs.h:1.4      Sun Nov 29 07:18:56 2009
+++ rtems/cpukit/libfs/src/nfsclient/src/librtemsNfs.h  Mon May 31 08:56:36 2010
</font><font color='#997700'>@@ -70,6 +70,10 @@
</font> #include <netinet/in.h>
 #include <arpa/inet.h>
 
<font color='#000088'>+#ifdef __cplusplus
+extern "C" {
+#endif
+
</font> /* RPCIO driver interface.
  * If you need RPCIO for other purposes than NFS
  * you may want to include <rpcio.h>
<font color='#997700'>@@ -82,7 +86,9 @@
</font>  */
 extern rtems_task_priority rpciodPriority;
 
<font color='#880000'>-/* Initialize the driver
</font><font color='#000088'>+/* Initialize the driver.
+ *
+ * Note, called in nfsfs initialise when mount is called.
</font>  *
  * RETURNS: 0 on success, -1 on failure
  */
<font color='#997700'>@@ -103,6 +109,8 @@
</font>  * NOTE: The RPCIO driver must have been initialized prior to
  *       calling this.
  *
<font color='#000088'>+ * Note, called in nfsfs initialise when mount is called with defaults.
+ *
</font>  * ARGS:  depth of the small and big
  *<span style="background-color: #FF0000"> </span>                       transaction pools, i.e. how
  *<span style="background-color: #FF0000"> </span>                       many transactions (buffers)
<font color='#997700'>@@ -131,22 +139,12 @@
</font> int
 nfsMountsShow(FILE *f);
 
<font color='#880000'>-/* convenience wrapper
- *
- * NOTE: this routine calls NON-REENTRANT
- *       gethostbyname() if the host is
- *       not in 'dot' notation.
</font><font color='#000088'>+/*
+ * Filesystem mount table mount handler. Do not call, use the mount call.
</font>  */
<font color='#880000'>-int
-nfsMount(char *uidhost, char *path, char *mntpoint);
-
-/* Alternatively, a pointer to the filesystem operations
- * table can be supplied to the native RTEMS (NON-POSIX!)
- * 'mount()' call.
- * Supply a "<host.in.ip.dot.notation>:<path>" string
- * for 'device' argument to 'mount()'.
- */
-extern struct _rtems_filesystem_operations_table nfs_fs_ops;
</font><font color='#000088'>+int<span style="background-color: #FF0000"> </span>
+rtems_nfsfs_initialize(rtems_filesystem_mount_table_entry_t *mt_entry,
+                       const void                           *data);
</font> 
 /* A utility routine to find the path leading to a
  * rtems_filesystem_location_info_t node.
<font color='#997700'>@@ -174,4 +172,9 @@
</font> /* Read current timeout (in milliseconds) */
 uint32_t
 nfsGetTimeout(void);
<font color='#000088'>+
+#ifdef __cplusplus
+}
+#endif
+
</font> #endif

<font color='#006600'>diff -u rtems/cpukit/libfs/src/nfsclient/src/nfs.c:1.20 rtems/cpukit/libfs/src/nfsclient/src/nfs.c:1.21
--- rtems/cpukit/libfs/src/nfsclient/src/nfs.c:1.20     Thu May 27 11:17:44 2010
+++ rtems/cpukit/libfs/src/nfsclient/src/nfs.c  Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -4,6 +4,8 @@
</font> 
 /* Author: Till Straumann <strauman@slac.stanford.edu> 2002 */
 
<font color='#000088'>+/* Hacked on by others. */
+
</font> /*
  * Authorship
  * ----------
<font color='#997700'>@@ -1193,8 +1195,7 @@
</font> }
 
 /*
<font color='#880000'>- * IP address helper. Note that we avoid
- * gethostbyname() since it's not reentrant.
</font><font color='#000088'>+ * IP address helper.
</font>  *
  * initialize a sockaddr_in from a
  * [<uid>'.'<gid>'@']<host>':'<path>" string and let
<font color='#997700'>@@ -1211,7 +1212,8 @@
</font>                   char **pHost, struct sockaddr_in *psa,
                        char **pPath)
 {
<font color='#880000'>-char       host[30];
</font><font color='#000088'>+struct hostent *h;
+char   host[64];
</font> char      *chpt = *pPath;
 char   *path;
 int            len;
<font color='#997700'>@@ -1238,7 +1240,7 @@
</font> 
        /* split the device name which is in the form
         *
<font color='#880000'>-    * <host_ip> ':' <path>
</font><font color='#000088'>+       * <host> ':' <path>
</font>    *
         * into its components using a local buffer
         */
<font color='#997700'>@@ -1254,11 +1256,19 @@
</font>   strncpy(host, chpt, len);
        host[len]=0;
 
<font color='#880000'>-   if ( ! inet_pton(AF_INET, host, &psa->sin_addr) ) {
-               errno = ENXIO;
</font><font color='#000088'>+  /* BEGIN OF NON-THREAD SAFE REGION */
+
+       h = gethostbyname(host);
+
+       if ( !h ) {
+               errno = EINVAL;
</font>           return -1;
        }
 
<font color='#000088'>+   memcpy(&psa->sin_addr, h->h_addr, sizeof (struct in_addr));
+<span style="background-color: #FF0000">  </span>
+  /* END OF NON-THREAD SAFE REGION */
+
</font>   psa->sin_family = AF_INET;
        psa->sin_port   = 0;
        *pPath          = path;
<font color='#997700'>@@ -1898,9 +1908,9 @@
</font> #endif
 
 
<font color='#880000'>-/* This op is called as the last step of mounting this FS */
-STATIC int nfs_fsmount_me(
-       rtems_filesystem_mount_table_entry_t *mt_entry
</font><font color='#000088'>+int rtems_nfsfs_initialize(
+       rtems_filesystem_mount_table_entry_t *mt_entry,
+  const void                           *data
</font> )
 {
 char                           *host;
<font color='#997700'>@@ -1917,11 +1927,20 @@
</font> int                                       e         = -1;
 char                           *path     = mt_entry->dev;
 
<font color='#000088'>+  if (rpcUdpInit () < 0) {
+    fprintf (stderr, "error: initialising RPC\n");
+    return -1;
+  }
+<span style="background-color: #FF0000">  </span>
+       nfsInit(0, 0);
</font> 
<font color='#000088'>+#if 0
+       printf("Trying to mount %s on %s\n",path,mntpoint);
+#endif
+<span style="background-color: #FF0000">  </span>
</font>   if ( buildIpAddr(&uid, &gid, &host, &saddr, &path) )
                return -1;
 
<font color='#880000'>-
</font> #ifdef NFS_V2_PORT
        /* if the portmapper fails, retry a fixed port */
        for (retry = 1, saddr.sin_port = 0, stat = RPC_FAILED;
<font color='#997700'>@@ -2460,7 +2479,7 @@
</font>           nfs_chown,                      /* OPTIONAL; may be NULL */
                nfs_freenode,           /* OPTIONAL; may be NULL; (release node_access) */
                nfs_mount,                      /* OPTIONAL; may be NULL */
<font color='#880000'>-           nfs_fsmount_me,         /* OPTIONAL; may be NULL -- but this makes NO SENSE */
</font><font color='#000088'>+              rtems_nfsfs_initialize,         /* OPTIONAL; may be NULL -- not used anymore */
</font>           nfs_unmount,            /* OPTIONAL; may be NULL */
                nfs_fsunmount_me,       /* OPTIONAL; may be NULL */
                nfs_utime,                      /* OPTIONAL; may be NULL */
<font color='#997700'>@@ -3228,6 +3247,8 @@
</font>   return 0;
 }
 
<font color='#000088'>+#if 0
+CCJ_REMOVE_MOUNT
</font> /* convenience wrapper
  *
  * NOTE: this routine calls NON-REENTRANT
<font color='#997700'>@@ -3237,7 +3258,6 @@
</font> int
 nfsMount(char *uidhost, char *path, char *mntpoint)
 {
<font color='#880000'>-rtems_filesystem_mount_table_entry_t       *mtab;
</font> struct stat                                                               st;
 int                                                                            devl;
 char                                                                   *host;
<font color='#997700'>@@ -3310,11 +3330,11 @@
</font> 
        printf("Trying to mount %s on %s\n",dev,mntpoint);
 
<font color='#880000'>-   if (mount(&mtab,
-                         &nfs_fs_ops,
-                         RTEMS_FILESYSTEM_READ_WRITE,
-                         dev,
-                         mntpoint)) {
</font><font color='#000088'>+      if (mount(dev,
+                         mntpoint,
+                         "nfs",
+<span style="background-color: #FF0000"> </span>                   RTEMS_FILESYSTEM_READ_WRITE,
+<span style="background-color: #FF0000"> </span>                   NULL)) {
</font>           perror("nfsMount - mount");
                goto cleanup;
        }
<font color='#997700'>@@ -3325,6 +3345,7 @@
</font>   free(dev);
        return rval;
 }
<font color='#000088'>+#endif
</font> 
 /* HERE COMES A REALLY UGLY HACK */
 

<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.8 rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.9
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.8    Fri May 28 10:16:39 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c        Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -120,7 +120,7 @@
</font>     node_len = 0;
     while (!rtems_filesystem_is_separator (*path) &&
            (*path != '\0') && pathlen &&
<font color='#880000'>-           (node_len + 1 < rtems_rfs_fs_max_name (fs)))
</font><font color='#000088'>+           ((node_len + 1) < rtems_rfs_fs_max_name (fs)))
</font>     {
       path++;
       pathlen--;
<font color='#997700'>@@ -1214,7 +1214,8 @@
</font>  * Forward decl for the ops table.
  */
 
<font color='#880000'>-int rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t *mt_entry);
</font><font color='#000088'>+int rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t *mt_entry,
+                                const void                           *data);
</font> int rtems_rfs_rtems_shutdown (rtems_filesystem_mount_table_entry_t *mt_entry);
 
 /**
<font color='#997700'>@@ -1247,7 +1248,8 @@
</font>  */
 
 int
<font color='#880000'>-rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry)
</font><font color='#000088'>+rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
+                            const void*                           data)
</font> {
   rtems_rfs_rtems_private* rtems;
   rtems_rfs_file_system*   fs;

<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs.h:1.1 rtems/cpukit/libfs/src/rfs/rtems-rfs.h:1.2
--- rtems/cpukit/libfs/src/rfs/rtems-rfs.h:1.1  Wed Feb 17 18:24:25 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs.h      Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -23,13 +23,8 @@
</font> #include <rtems/fs.h>
 
 /**
<font color='#880000'>- * File ops table for the RFS file system.
- */
-const rtems_filesystem_operations_table rtems_rfs_ops;
-
-/**
</font>  * Initialise the RFS File system.
  */
<font color='#880000'>-int rtems_rfs_initialise (rtems_filesystem_mount_table_entry_t *mt_entry);
</font><font color='#000088'>+int rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t *mt_entry);
</font> 
 #endif

<font color='#006600'>diff -u rtems/cpukit/libmisc/Makefile.am:1.84 rtems/cpukit/libmisc/Makefile.am:1.85
--- rtems/cpukit/libmisc/Makefile.am:1.84       Sat Mar 27 22:25:06 2010
+++ rtems/cpukit/libmisc/Makefile.am    Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -76,7 +76,7 @@
</font>     shell/main_id.c shell/main_logoff.c shell/main_ln.c shell/main_ls.c \
     shell/main_mallocinfo.c shell/main_mdump.c shell/main_medit.c \
     shell/main_mfill.c shell/main_mkdir.c shell/main_mount.c \
<font color='#880000'>-    shell/main_mount_msdos.c shell/main_mmove.c shell/main_msdosfmt.c \
</font><font color='#000088'>+    shell/main_mmove.c shell/main_msdosfmt.c \
</font>     shell/main_mv.c shell/main_mwdump.c shell/main_perioduse.c \
     shell/main_pwd.c shell/main_rm.c shell/main_rmdir.c shell/main_sleep.c \
     shell/main_stackuse.c shell/main_tty.c shell/main_umask.c \
<font color='#997700'>@@ -95,14 +95,13 @@
</font>     shell/dd-misc.c shell/dd-position.c \
     shell/main_hexdump.c shell/hexdump-conv.c shell/hexdump-display.c \
     shell/hexdump-odsyntax.c shell/hexdump-parse.c shell/hexsyntax.c \
<font color='#880000'>-    shell/main_time.c shell/main_mknod.c  shell/main_mount_rfs.c \
</font><font color='#000088'>+    shell/main_time.c shell/main_mknod.c \
</font>     shell/main_setenv.c shell/main_getenv.c shell/main_unsetenv.c \
     shell/main_mkrfs.c shell/main_debugrfs.c
 
 if LIBNETWORKING
<font color='#880000'>-libshell_a_SOURCES += shell/main_mount_ftp.c shell/main_mount_tftp.c \
-    shell/main_ifconfig.c shell/main_route.c shell/main_netstats.c \
-    shell/main_mount_nfs.c
</font><font color='#000088'>+libshell_a_SOURCES += \
+    shell/main_ifconfig.c shell/main_route.c shell/main_netstats.c
</font> endif
 endif
 

<font color='#006600'>diff -u rtems/cpukit/libmisc/fsmount/fsmount.h:1.6 rtems/cpukit/libmisc/fsmount/fsmount.h:1.7
--- rtems/cpukit/libmisc/fsmount/fsmount.h:1.6  Tue May  5 07:57:16 2009
+++ rtems/cpukit/libmisc/fsmount/fsmount.h      Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -90,24 +90,24 @@
</font>  */
 typedef struct {
   /**
<font color='#880000'>-   * Device file path.
</font><font color='#000088'>+   * Source for the mount.
</font>    */
<font color='#880000'>-  const char *dev;
</font><font color='#000088'>+  const char *source;
</font> 
   /**
<font color='#880000'>-   * Mount point path.
</font><font color='#000088'>+   * Target for the mount.
</font>    */
<font color='#880000'>-  const char *mount_point;
</font><font color='#000088'>+  const char *target;
</font> 
   /**
    * File system operations.
    */
<font color='#880000'>-  const rtems_filesystem_operations_table *fs_ops;
</font><font color='#000088'>+  const char *type;
</font> 
   /**
    * File system mount options.
    */
<font color='#880000'>-  rtems_filesystem_options_t mount_options;
</font><font color='#000088'>+  rtems_filesystem_options_t options;
</font> 
   /**
    * Report @ref rtems_fstab_conditions "condition flags".
<font color='#997700'>@@ -128,7 +128,7 @@
</font>  *
  * @see rtems_fsmount().
  */
<font color='#880000'>-int rtems_fsmount_create_mount_point( const char *mount_point);
</font><font color='#000088'>+int rtems_fsmount_create_mount_point(const char *mount_point);
</font> 
 /**
  * Mounts the file systems listed in the file system mount table @a fstab of
<font color='#997700'>@@ -160,23 +160,22 @@
</font>  *
  * #include <rtems.h>
  * #include <rtems/bdpart.h>
<font color='#880000'>- * #include <rtems/dosfs.h>
</font>  * #include <rtems/error.h>
  * #include <rtems/fsmount.h>
  *
  * static const rtems_fstab_entry fstab [] = {
  *   {
<font color='#880000'>- *     .dev = "/dev/sd-card-a",
- *     .mount_point = "/mnt",
- *     .fs_ops = &msdos_ops,
- *     .mount_options = RTEMS_FILESYSTEM_READ_WRITE,
</font><font color='#000088'>+ *     .source = "/dev/sd-card-a",
+ *     .target = "/mnt",
+ *     .type = "dosfs",
+ *     .options = RTEMS_FILESYSTEM_READ_WRITE,
</font>  *     .report_reasons = RTEMS_FSTAB_ANY,
  *     .abort_reasons = RTEMS_FSTAB_OK
  *   }, {
<font color='#880000'>- *     .dev = "/dev/sd-card-a1",
- *     .mount_point = "/mnt",
- *     .fs_ops = &msdos_ops,
- *     .mount_options = RTEMS_FILESYSTEM_READ_WRITE,
</font><font color='#000088'>+ *     .source = "/dev/sd-card-a1",
+ *     .target = "/mnt",
+ *     .type = "dosfs",
+ *     .options = RTEMS_FILESYSTEM_READ_WRITE,
</font>  *     .report_reasons = RTEMS_FSTAB_ANY,
  *     .abort_reasons = RTEMS_FSTAB_NONE
  *   }

<font color='#006600'>diff -u rtems/cpukit/libmisc/fsmount/fsmount.c:1.11 rtems/cpukit/libmisc/fsmount/fsmount.c:1.12
--- rtems/cpukit/libmisc/fsmount/fsmount.c:1.11 Wed Jan 20 10:24:11 2010
+++ rtems/cpukit/libmisc/fsmount/fsmount.c      Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -118,82 +118,81 @@
</font> int rtems_fsmount
 (
 /*-------------------------------------------------------------------------*\
<font color='#880000'>-| Purpose:                                                                  |
-|  This function will create the mount points listed and mount the file     |
-|   systems listed in the calling parameters                                |
-+---------------------------------------------------------------------------+
-| Input Parameters:                                                         |
-\*-------------------------------------------------------------------------*/
- const rtems_fstab_entry *fstab_ptr,
- size_t fstab_count,
- size_t *fail_idx
</font><font color='#000088'>+  | Purpose:                                                                  |
+  |  This function will create the mount points listed and mount the file     |
+  |   systems listed in the calling parameters                                |
+  +---------------------------------------------------------------------------+
+  | Input Parameters:                                                         |
+  \*-------------------------------------------------------------------------*/
+  const rtems_fstab_entry *fstab_ptr,
+  size_t fstab_count,
+  size_t *fail_idx
</font>  )
 /*-------------------------------------------------------------------------*\
<font color='#880000'>-| Return Value:                                                             |
-|    0, if success, -1 and errno if failed                                  |
-\*=========================================================================*/
</font><font color='#000088'>+  | Return Value:                                                             |
+  |    0, if success, -1 and errno if failed                                  |
+  \*=========================================================================*/
</font> {
   int rc = 0;
   int tmp_rc;
   size_t fstab_idx = 0;
<font color='#880000'>-  rtems_filesystem_mount_table_entry_t *tmp_mt_entry;
</font>   bool terminate = false;
 
   /*
    * scan through all fstab entries;
    */
   while (!terminate &&
<font color='#880000'>-    (fstab_idx < fstab_count)) {
</font><font color='#000088'>+         (fstab_idx < fstab_count)) {
</font>     tmp_rc = 0;
     /*
      * create mount point
      */
     if (tmp_rc == 0) {
<font color='#880000'>-      tmp_rc = rtems_fsmount_create_mount_point(fstab_ptr->mount_point);
</font><font color='#000088'>+      tmp_rc = rtems_fsmount_create_mount_point(fstab_ptr->target);
</font>       if (tmp_rc != 0) {
<font color='#880000'>-   if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNTPNT_CRTERR)) {
-         fprintf(stdout,"fsmount: creation of mount point \"%s\" failed: %s\n",
-                fstab_ptr->mount_point,
-                strerror(errno));
-       }
-       if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNTPNT_CRTERR)) {
-         terminate = true;
-         rc = tmp_rc;
-       }
</font><font color='#000088'>+        if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNTPNT_CRTERR)) {
+          fprintf(stdout,"fsmount: creation of mount point \"%s\" failed: %s\n",
+                  fstab_ptr->target,
+                  strerror(errno));
+        }
+        if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNTPNT_CRTERR)) {
+          terminate = true;
+          rc = tmp_rc;
+        }
</font>       }
     }
     /*
      * mount device to given mount point
      */
     if (tmp_rc == 0) {
<font color='#880000'>-      tmp_rc = mount(&tmp_mt_entry,
-                    fstab_ptr->fs_ops,
-                    fstab_ptr->mount_options,
-                    fstab_ptr->dev,
-                    fstab_ptr->mount_point);
</font><font color='#000088'>+      tmp_rc = mount(fstab_ptr->source,
+                     fstab_ptr->target,
+                     fstab_ptr->type,
+                     fstab_ptr->options,
+                     NULL);
</font>       if (tmp_rc != 0) {
<font color='#880000'>-   if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
-         fprintf(stdout,"fsmount: mounting of \"%s\" to"
-                " \"%s\" failed: %s\n",
-                fstab_ptr->dev,
-                fstab_ptr->mount_point,
-                strerror(errno));
-       }
-       if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_FAILED)) {
-         terminate = true;
-         rc = tmp_rc;
-       }
</font><font color='#000088'>+        if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
+          fprintf(stdout,"fsmount: mounting of \"%s\" to"
+                  " \"%s\" failed: %s\n",
+                  fstab_ptr->source,
+                  fstab_ptr->target,
+                  strerror(errno));
+        }
+        if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_FAILED)) {
+          terminate = true;
+          rc = tmp_rc;
+        }
</font>       }
       else {
<font color='#880000'>-   if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
-         fprintf(stdout,"fsmount: mounting of \"%s\" to"
-                " \"%s\" succeeded\n",
-                fstab_ptr->dev,
-                fstab_ptr->mount_point);
-       }
-       if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_OK)) {
-         terminate = true;
-       }
</font><font color='#000088'>+        if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
+          fprintf(stdout,"fsmount: mounting of \"%s\" to"
+                  " \"%s\" succeeded\n",
+                  fstab_ptr->source,
+                  fstab_ptr->target);
+        }
+        if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_OK)) {
+          terminate = true;
+        }
</font>       }
     }
     /*

<font color='#006600'>diff -u rtems/cpukit/libmisc/shell/main_mount.c:1.7 rtems/cpukit/libmisc/shell/main_mount.c:1.8
--- rtems/cpukit/libmisc/shell/main_mount.c:1.7 Sun Nov 29 06:12:39 2009
+++ rtems/cpukit/libmisc/shell/main_mount.c     Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -24,74 +24,24 @@
</font> #include <rtems.h>
 #include <rtems/shell.h>
 #include <rtems/shellconfig.h>
<font color='#880000'>-#include <rtems/dosfs.h>
-#include <rtems/fsmount.h>
</font><font color='#000088'>+#include <rtems/libio.h>
</font> #include "internal.h"
 
<font color='#880000'>-static rtems_chain_control filesystems;
-static bool                fs_init;
-
-static void rtems_shell_mount_fsys_init(void)
-{
-  if (!fs_init)
-  {
-    rtems_chain_initialize_empty (&filesystems);
-    fs_init = true;
-  }
-}
-
-void rtems_shell_mount_add_fsys(rtems_shell_filesystems_t* fs)
-{
-  rtems_shell_mount_fsys_init();
-  rtems_chain_append (&filesystems, &fs->link);
-}
-
-void rtems_shell_mount_del_fsys(rtems_shell_filesystems_t* fs)
-{
-  if (fs_init)
-    rtems_chain_extract (&fs->link);
-}
-
-int rtems_shell_libc_mounter(
-  const char*                driver,
-  const char*                path,
-  rtems_shell_filesystems_t* fs,
-  rtems_filesystem_options_t options)
-{
-  rtems_filesystem_mount_table_entry_t* mt_entry;
-  /*
-   * Mount the disk.
-   */
-
-  if (mount (&mt_entry, fs->fs_ops, options, (char*) driver, (char*) path) < 0)
-  {
-    fprintf (stderr, "mount: mount failed: %s\n", strerror (errno));
-    return 1;
-  }
-
-  return 0;
-}
-
-#define NUMOF(_i) (sizeof (_i) / sizeof (_i[0]))
-
</font> int rtems_shell_main_mount(
   int   argc,
   char *argv[]
 )
 {
   rtems_filesystem_options_t options = RTEMS_FILESYSTEM_READ_WRITE;
<font color='#880000'>-  rtems_shell_filesystems_t* fs = NULL;
-  char*                      driver = NULL;
-  char*                      mount_point = NULL;
</font><font color='#000088'>+  char*                      type = NULL;
+  char*                      source = NULL;
+  char*                      target = NULL;
+  char*                      fsoptions = NULL;
</font>   int                        arg;
 
<font color='#880000'>-  rtems_shell_mount_fsys_init();
-
</font>   for (arg = 1; arg < argc; arg++) {
     if (argv[arg][0] == '-') {
       if (argv[arg][1] == 't') {
<font color='#880000'>-        rtems_shell_filesystems_t** a;
-
</font>         arg++;
         if (arg == argc) {
           fprintf(
<font color='#997700'>@@ -101,71 +51,58 @@
</font>           );
           return 1;
         }
<font color='#880000'>-
-        for (a = rtems_shell_Mount_filesystems; *a; a++) {
-          if (strcmp (argv[arg], (*a)->name) == 0) {
-            fs = *a;
-            break;
-          }
-        }
-
-        if (!fs && !rtems_chain_is_empty(&filesystems)) {
-          rtems_chain_node* node = filesystems.first;
-          while (!rtems_chain_is_tail (&filesystems, node)) {
-            rtems_shell_filesystems_t* f = (rtems_shell_filesystems_t*)node;
-            if (strcmp (argv[arg], f->name) == 0) {
-              fs = f;
-              break;
-            }
-            node = node->next;
-          }
-        }
</font><font color='#000088'>+        type = argv[arg];
</font>       } else if (argv[arg][1] == 'r') {
         options = RTEMS_FILESYSTEM_READ_ONLY;
       } else if (argv[arg][1] == 'L') {
<font color='#880000'>-        rtems_shell_filesystems_t** a;
-        fprintf (stderr, "File systems: ");
-        for (a = rtems_shell_Mount_filesystems; *a; a++)
-          if (*a)
-            fprintf (stderr, "%s ", (*a)->name);
-        if (!rtems_chain_is_empty(&filesystems)) {
-          rtems_chain_node* node = filesystems.first;
-          while (!rtems_chain_is_tail (&filesystems, node)) {
-            rtems_shell_filesystems_t* f = (rtems_shell_filesystems_t*)node;
-            fprintf (stderr, "%s ", f->name);
-            node = node->next;
-          }
</font><font color='#000088'>+        const rtems_filesystem_table_t* fs;
+        fs = rtems_filesystem_table_first();
+        printf ("File systems: ");
+        while (fs) {
+          printf ("%s ", fs->type);
+          fs = rtems_filesystem_table_next(fs);
</font>         }
<font color='#880000'>-        fprintf (stderr, "\n");
-        return 1;
</font><font color='#000088'>+        printf ("\n");
+        return 0;
+      } else if (argv[arg][1] == 'o') {
+        arg++;
+        if (arg == argc) {
+          fprintf(
+            stderr,
+            "%s: -o needs a list if filesystem options.\n",
+            argv[0]
+          );
+          return 1;
+        }
+        fsoptions = argv[arg];
</font>       } else {
         fprintf (stderr, "unknown option: %s\n", argv[arg]);
         return 1;
       }
     } else {
<font color='#880000'>-      if (!driver)
-        driver = argv[arg];
-      else if (!mount_point)
-        mount_point = argv[arg];
</font><font color='#000088'>+      if (!source)
+        source = argv[arg];
+      else if (!target)
+        target = argv[arg];
</font>       else {
         fprintf (
<font color='#880000'>-          stderr, "mount: driver and mount only require: %s\n", argv[arg]);
</font><font color='#000088'>+          stderr, "mount: source and mount only require: %s\n", argv[arg]);
</font>         return 1;
       }
     }
   }
 
<font color='#880000'>-  if (fs == NULL) {
</font><font color='#000088'>+  if (!type) {
</font>     fprintf (stderr, "mount: no file-system; see the -L option\n");
     return 1;
   }
 
<font color='#880000'>-  if (fs->driver_needed && !driver) {
-    fprintf (stderr, "mount: no driver\n");
</font><font color='#000088'>+  if (!source) {
+    fprintf (stderr, "mount: no source\n");
</font>     return 1;
   }
 
<font color='#880000'>-  if (!mount_point) {
</font><font color='#000088'>+  if (!target) {
</font>     fprintf (stderr, "mount: no mount point\n");
     return 1;
   }
<font color='#997700'>@@ -174,19 +111,21 @@
</font>    * Mount the disk.
    */
 
<font color='#880000'>-  if (fs->mounter (driver, mount_point, fs, options))
</font><font color='#000088'>+  if (mount (source, target, type, options, fsoptions) < 0) {
+    fprintf (stderr, "error: %s\n", strerror(errno));
</font>     return 1;
<font color='#000088'>+  }
</font> 
<font color='#880000'>-  printf ("mounted %s -> %s\n", driver, mount_point);
</font><font color='#000088'>+  printf ("mounted %s -> %s\n", source, target);
</font> 
   return 0;
 }
 
 rtems_shell_cmd_t rtems_shell_MOUNT_Command = {
<font color='#880000'>-  "mount",                                                /* name */
-  "mount [-t fstype] [-r] [-L] device path # mount disk", /* usage */
-  "files",                                                /* topic */
-  rtems_shell_main_mount,                                 /* command */
-  NULL,                                                   /* alias */
-  NULL                                                    /* next */
</font><font color='#000088'>+  "mount",                                     /* name */
+  "mount [-t type] [-r] [-L] source target",   /* usage */
+  "files",                                     /* topic */
+  rtems_shell_main_mount,                      /* command */
+  NULL,                                        /* alias */
+  NULL                                         /* next */
</font> };

<font color='#006600'>diff -u rtems/cpukit/libmisc/shell/shellconfig.h:1.26 rtems/cpukit/libmisc/shell/shellconfig.h:1.27
--- rtems/cpukit/libmisc/shell/shellconfig.h:1.26       Wed Feb 24 03:30:40 2010
+++ rtems/cpukit/libmisc/shell/shellconfig.h    Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -92,17 +92,6 @@
</font> extern rtems_shell_alias_t *rtems_shell_Initial_aliases[];
 
 /*
<font color='#880000'>- *  Externs for mount command helpers
- */
-extern rtems_shell_filesystems_t rtems_shell_Mount_RFS;
-extern rtems_shell_filesystems_t rtems_shell_Mount_MSDOS;
-extern rtems_shell_filesystems_t rtems_shell_Mount_TFTP;
-extern rtems_shell_filesystems_t rtems_shell_Mount_FTP;
-extern rtems_shell_filesystems_t rtems_shell_Mount_NFS;
-
-extern rtems_shell_filesystems_t *rtems_shell_Mount_filesystems[];
-
-/*
</font>  *  If we are configured to alias a command, then make sure the underlying
  *  command is configured.
  */
<font color='#997700'>@@ -444,34 +433,6 @@
</font>     NULL
   };
 
<font color='#880000'>-  /*
-   * The mount command's support file system types.
-   */
-  #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
-       !defined(CONFIGURE_SHELL_COMMAND_NO_MOUNT)) || \
-       defined(CONFIGURE_SHELL_COMMAND_MOUNT)
-    rtems_shell_filesystems_t *rtems_shell_Mount_filesystems[] = {
-      #if defined(CONFIGURE_SHELL_MOUNT_RFS)
-        &rtems_shell_Mount_RFS,
-      #endif
-      #if defined(CONFIGURE_SHELL_MOUNT_MSDOS)
-        &rtems_shell_Mount_MSDOS,
-      #endif
-      #if RTEMS_NETWORKING
-        #if defined(CONFIGURE_SHELL_MOUNT_TFTP)
-          &rtems_shell_Mount_TFTP,
-        #endif
-        #if defined(CONFIGURE_SHELL_MOUNT_FTP)
-          &rtems_shell_Mount_FTP,
-        #endif
-        #if defined(CONFIGURE_SHELL_MOUNT_NFS)
-          &rtems_shell_Mount_NFS,
-        #endif
-      #endif
-      NULL
-    };
-  #endif
-
</font> #endif
 
 #endif

<font color='#006600'>diff -u rtems/cpukit/libnetworking/lib/ftpfs.c:1.28 rtems/cpukit/libnetworking/lib/ftpfs.c:1.29
--- rtems/cpukit/libnetworking/lib/ftpfs.c:1.28 Thu May 27 11:36:02 2010
+++ rtems/cpukit/libnetworking/lib/ftpfs.c      Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -130,6 +130,8 @@
</font>   return 0;
 }
 
<font color='#000088'>+#if 0
+CCJ_REMOVE_MOUNT
</font> rtems_status_code rtems_ftpfs_mount(const char *mount_point)
 {
   int rv = 0;
<font color='#997700'>@@ -156,6 +158,7 @@
</font> 
   return RTEMS_SUCCESSFUL;
 }
<font color='#000088'>+#endif
</font> 
 static rtems_status_code rtems_ftpfs_do_ioctl(
   const char *mount_point,
<font color='#997700'>@@ -234,19 +237,6 @@
</font>   );
 }
 
<font color='#880000'>-int rtems_bsdnet_initialize_ftp_filesystem(void)
-{
-  rtems_status_code sc = RTEMS_SUCCESSFUL;
-
-  sc = rtems_ftpfs_mount(NULL);
-
-  if (sc == RTEMS_SUCCESSFUL) {
-    return 0;
-  } else {
-    return -1;
-  }
-}
-
</font> typedef void (*rtems_ftpfs_reply_parser)(
   const char * /* reply fragment */,
   size_t /* reply fragment length */,
<font color='#997700'>@@ -1232,8 +1222,9 @@
</font>   return RTEMS_FILESYSTEM_MEMORY_FILE;
 }
 
<font color='#880000'>-static int rtems_ftpfs_mount_me(
-  rtems_filesystem_mount_table_entry_t *e
</font><font color='#000088'>+int rtems_ftpfs_initialize(
+  rtems_filesystem_mount_table_entry_t *e,
+  const void                           *d
</font> )
 {
   rtems_ftpfs_mount_entry *me = malloc(sizeof(rtems_ftpfs_mount_entry));
<font color='#997700'>@@ -1337,7 +1328,7 @@
</font>   .chown_h = NULL,
   .freenod_h = rtems_ftpfs_free_node,
   .mount_h = NULL,
<font color='#880000'>-  .fsmount_me_h = rtems_ftpfs_mount_me,
</font><font color='#000088'>+  .fsmount_me_h = rtems_ftpfs_initialize,
</font>   .unmount_h = NULL,
   .fsunmount_me_h = rtems_ftpfs_unmount_me,
   .utime_h = NULL,

<font color='#006600'>diff -u rtems/cpukit/libnetworking/lib/tftpDriver.c:1.37 rtems/cpukit/libnetworking/lib/tftpDriver.c:1.38
--- rtems/cpukit/libnetworking/lib/tftpDriver.c:1.37    Thu May 27 11:36:02 2010
+++ rtems/cpukit/libnetworking/lib/tftpDriver.c Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -33,6 +33,7 @@
</font> #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
<font color='#000088'>+#include <netdb.h>
</font> 
 #ifdef RTEMS_TFTP_DRIVER_DEBUG
 int rtems_tftp_driver_debug = 1;
<font color='#997700'>@@ -44,18 +45,6 @@
</font> #define UDP_PORT_BASE        3180
 
 /*
<font color='#880000'>- * Pathname prefix
- */
-#define TFTP_PATHNAME_PREFIX "/TFTP/"
-
-/*
- * Root node_access value
- * By using the address of a local static variable
- * we ensure a unique value for this identifier.
- */
-#define ROOT_NODE_ACCESS    (&tftp_mutex)
-
-/*
</font>  * Default limits
  */
 #define PACKET_FIRST_TIMEOUT_MILLISECONDS  400L
<font color='#997700'>@@ -152,43 +141,49 @@
</font> };
 
 /*
<font color='#880000'>- * Number of streams open at the same time
</font><font color='#000088'>+ * Flags for filesystem info.
</font>  */
<font color='#880000'>-static rtems_id tftp_mutex;
-static int nStreams;
-static struct tftpStream ** volatile tftpStreams;
</font><font color='#000088'>+#define TFTPFS_VERBOSE (1 << 0)
</font> 
<font color='#880000'>-typedef const char *tftp_node;
-extern rtems_filesystem_operations_table  rtems_tftp_ops;
-extern rtems_filesystem_file_handlers_r   rtems_tftp_handlers;
</font><font color='#000088'>+/*
+ * Root node_access value
+ * By using the address of the file system<span style="background-color: #FF0000"> </span>
+ * we ensure a unique value for this identifier.
+ */
+#define ROOT_NODE_ACCESS(_fs) (_fs)
</font> 
 /*
<font color='#880000'>- *  Direct copy from the IMFS.  Look at this.
</font><font color='#000088'>+ * TFTP File system info.
</font>  */
<font color='#000088'>+typedef struct tftpfs_info_s {
+  uint32_t flags;
+  rtems_id tftp_mutex;
+  int nStreams;
+  struct tftpStream ** volatile tftpStreams;
+} tftpfs_info_t;
</font> 
<font color='#880000'>-rtems_filesystem_limits_and_options_t rtems_tftp_limits_and_options = {
-   5,   /* link_max */
-   6,   /* max_canon */
-   7,   /* max_input */
-   255, /* name_max */
-   255, /* path_max */
-   2,   /* pipe_buf */
-   1,   /* posix_async_io */
-   2,   /* posix_chown_restrictions */
-   3,   /* posix_no_trunc */
-   4,   /* posix_prio_io */
-   5,   /* posix_sync_io */
-   6    /* posix_vdisable */
-};
</font><font color='#000088'>+#define tftpfs_info_mount_table(_mt) ((tftpfs_info_t*) ((_mt)->fs_info))
+#define tftpfs_info_pathloc(_pl)     ((tftpfs_info_t*) ((_pl)->mt_entry->fs_info))
+#define tftpfs_info_iop(_iop)        (tftpfs_info_pathloc (&((_iop)->pathinfo)))
+
+/*
+ * Number of streams open at the same time
+ */
+
+typedef const char *tftp_node;
+extern rtems_filesystem_operations_table  rtems_tftp_ops;
+extern rtems_filesystem_file_handlers_r   rtems_tftp_handlers;
</font> 
<font color='#880000'>-static int rtems_tftp_mount_me(
-  rtems_filesystem_mount_table_entry_t *temp_mt_entry
</font><font color='#000088'>+int rtems_tftpfs_initialize(
+  rtems_filesystem_mount_table_entry_t *mt_entry,
+  const void                           *data
</font> )
 {
<font color='#000088'>+  tftpfs_info_t     *fs;
</font>   rtems_status_code  sc;
 
<font color='#880000'>-  temp_mt_entry->mt_fs_root.handlers = &rtems_tftp_handlers;
-  temp_mt_entry->mt_fs_root.ops      = &rtems_tftp_ops;
</font><font color='#000088'>+  mt_entry->mt_fs_root.handlers = &rtems_tftp_handlers;
+  mt_entry->mt_fs_root.ops      = &rtems_tftp_ops;
</font> 
   /*
    *   We have no tftp filesystem specific data to maintain.  This
<font color='#997700'>@@ -197,16 +192,18 @@
</font>    *   And we maintain no real filesystem nodes, so there is no real root.
    */
 
<font color='#880000'>-  temp_mt_entry->fs_info                = NULL;
-  temp_mt_entry->mt_fs_root.node_access = ROOT_NODE_ACCESS;
-
-  /*
-   *  These need to be looked at for full POSIX semantics.
-   */
-
-  temp_mt_entry->pathconf_limits_and_options = rtems_tftp_limits_and_options;
-
-
</font><font color='#000088'>+  fs = malloc (sizeof (tftpfs_info_t));
+  if (!fs)
+      rtems_set_errno_and_return_minus_one (ENOMEM);
+
+  fs->flags = 0;
+  fs->nStreams = 0;
+  fs->tftpStreams = 0;
+<span style="background-color: #FF0000">  </span>
+  mt_entry->fs_info                  = fs;
+  mt_entry->mt_fs_root.node_access   = ROOT_NODE_ACCESS (fs);
+  mt_entry->mt_fs_root.node_access_2 = NULL;
+<span style="background-color: #FF0000">  </span>
</font>   /*
    *  Now allocate a semaphore for mutual exclusion.
    *
<font color='#997700'>@@ -222,40 +219,51 @@
</font>     RTEMS_NO_PRIORITY_CEILING |
     RTEMS_LOCAL,
     0,
<font color='#880000'>-    &tftp_mutex
</font><font color='#000088'>+    &fs->tftp_mutex
</font>   );
 
   if (sc != RTEMS_SUCCESSFUL)
<font color='#880000'>-    rtems_set_errno_and_return_minus_one( ENOMEM );
</font><font color='#000088'>+      rtems_set_errno_and_return_minus_one (ENOMEM);
</font> 
<font color='#000088'>+  if (data) {
+      char* config = (char*) data;
+      char* token;
+      char* saveptr;
+      token = strtok_r (config, " ", &saveptr);
+      while (token) {
+          if (strcmp (token, "verbose") == 0)
+              fs->flags |= TFTPFS_VERBOSE;
+          token = strtok_r (NULL, " ", &saveptr);
+      }
+  }
+<span style="background-color: #FF0000">  </span>
</font>   return 0;
 }
 
 /*
<font color='#880000'>- * Initialize the TFTP driver
</font><font color='#000088'>+ * Release a stream and clear the pointer to it
</font>  */
<font color='#880000'>-
-int rtems_bsdnet_initialize_tftp_filesystem (void)
</font><font color='#000088'>+static void
+releaseStream (tftpfs_info_t *fs, int s)
</font> {
<font color='#880000'>-    int                                   status;
-    rtems_filesystem_mount_table_entry_t *entry;
-
-    status = mkdir( TFTP_PATHNAME_PREFIX, S_IRWXU | S_IRWXG | S_IRWXO );
-    if ( status == -1 )
-        return status;
-
-    status = mount(
-            &entry,
-            &rtems_tftp_ops,
-            RTEMS_FILESYSTEM_READ_WRITE,
-            NULL,
-            TFTP_PATHNAME_PREFIX
-    );
-
-    if ( status )
-        perror( "TFTP mount failed" );
</font><font color='#000088'>+    if (fs->tftpStreams[s] && (fs->tftpStreams[s]->socket >= 0))
+        close (fs->tftpStreams[s]->socket);
+    rtems_semaphore_obtain (fs->tftp_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
+    free (fs->tftpStreams[s]);
+    fs->tftpStreams[s] = NULL;
+    rtems_semaphore_release (fs->tftp_mutex);
+}
</font> 
<font color='#880000'>-    return status;
</font><font color='#000088'>+static int
+rtems_tftpfs_shutdown (rtems_filesystem_mount_table_entry_t* mt_entry)
+{
+  tftpfs_info_t *fs = tftpfs_info_mount_table (mt_entry);
+  int            s;
+  for (s = 0; s < fs->nStreams; s++)
+      releaseStream (fs, s);
+  rtems_semaphore_delete (fs->tftp_mutex);
+  free (fs);
+  return 0;
</font> }
 
 /*
<font color='#997700'>@@ -335,8 +343,8 @@
</font>         } from;
         socklen_t fromlen = sizeof from;
         len = recvfrom (tp->socket, &tp->pkbuf,
<font color='#880000'>-                                                    sizeof tp->pkbuf, 0,
-                                                    &from.s, &fromlen);
</font><font color='#000088'>+                        sizeof tp->pkbuf, 0,
+                        &from.s, &fromlen);
</font>         if (len < 0)
             break;
         if (from.i.sin_addr.s_addr == tp->farAddress.sin_addr.s_addr) {
<font color='#997700'>@@ -410,18 +418,6 @@
</font>     return 0;
 }
 
<font color='#880000'>-/*
- * Release a stream and clear the pointer to it
- */
-static void
-releaseStream (int s)
-{
-    rtems_semaphore_obtain (tftp_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-    free (tftpStreams[s]);
-    tftpStreams[s] = NULL;
-    rtems_semaphore_release (tftp_mutex);
-}
-
</font> static int rtems_tftp_evaluate_for_make(
    const char                         *path __attribute__((unused)),       /* IN     */
    rtems_filesystem_location_info_t   *pathloc,    /* IN/OUT */
<font color='#997700'>@@ -429,7 +425,8 @@
</font> )
 {
   pathloc->node_access = NULL;
<font color='#880000'>-  rtems_set_errno_and_return_minus_one( EIO );
</font><font color='#000088'>+  pathloc->node_access_2 = NULL;
+  rtems_set_errno_and_return_minus_one (EIO);
</font> }
 
 /*
<font color='#997700'>@@ -493,46 +490,54 @@
</font>   rtems_filesystem_location_info_t  *pathloc       /* IN/OUT */
 )
 {
<font color='#880000'>-    pathloc->handlers    = &rtems_tftp_handlers;
</font><font color='#000088'>+    tftpfs_info_t *fs;
+    char          *cp;
+
+    /*
+     * Get the file system info.
+     */
+    fs = tftpfs_info_pathloc (pathloc);
+
+    pathloc->handlers = &rtems_tftp_handlers;
</font> 
     /*
      * Hack to provide the illusion of directories inside the TFTP file system.
      * Paths ending in a / are assumed to be directories.
      */
     if (pathname[strlen(pathname)-1] == '/') {
<font color='#880000'>-        int isRelative = (pathloc->node_access != ROOT_NODE_ACCESS);
-        char *cp;
</font><font color='#000088'>+        int nal = 0;
+        if (pathloc->node_access != ROOT_NODE_ACCESS (fs))
+            nal = strlen(pathloc->node_access);
+        cp = malloc(nal + pathnamelen + 1);
+        if (cp == NULL)
+            rtems_set_errno_and_return_minus_one(ENOMEM);
+        if (nal)
+            memcpy (cp, pathloc->node_access, nal);
+        memcpy(cp + nal, pathname, pathnamelen);
+        cp[nal + pathnamelen] = '\0';
+        fixPath (cp);
+        pathloc->node_access = cp;
+    }
+    else {
+        if (pathnamelen) {
+            /*
+             * Reject it if it's not read-only or write-only.
+             */
+            flags &= RTEMS_LIBIO_PERMS_READ | RTEMS_LIBIO_PERMS_WRITE;
+            if ((flags != RTEMS_LIBIO_PERMS_READ)   \
+                && (flags != RTEMS_LIBIO_PERMS_WRITE))
+                rtems_set_errno_and_return_minus_one(EINVAL);
</font> 
<font color='#880000'>-        /*
-         * Reject attempts to open() directories
-         */
-        if (flags & RTEMS_LIBIO_PERMS_RDWR)
-            rtems_set_errno_and_return_minus_one( EISDIR );
-        if (isRelative) {
-            cp = malloc (strlen(pathloc->node_access)+strlen(pathname)+1);
-            if (cp == NULL)
-                rtems_set_errno_and_return_minus_one( ENOMEM );
-            strcpy (cp, pathloc->node_access);
-            strcat (cp, pathname);
-        }
-        else {
-            cp = strdup (pathname);
</font><font color='#000088'>+            cp = malloc(pathnamelen + 1);
</font>             if (cp == NULL)
<font color='#880000'>-                rtems_set_errno_and_return_minus_one( ENOMEM );
</font><font color='#000088'>+                rtems_set_errno_and_return_minus_one(ENOMEM);
+            memcpy(cp, pathname, pathnamelen);
+            cp[pathnamelen] = '\0';
+            fixPath (cp);
+            pathloc->node_access_2 = cp;
</font>         }
<font color='#880000'>-        fixPath (cp);
-        pathloc->node_access = cp;
-        return 0;
</font>     }
<font color='#880000'>-    if (pathloc->node_access != ROOT_NODE_ACCESS)
-        pathloc->node_access = 0;
</font> 
<font color='#880000'>-    /*
-     * Reject it if it's not read-only or write-only.
-     */
-    flags &= RTEMS_LIBIO_PERMS_READ | RTEMS_LIBIO_PERMS_WRITE;
-    if ((flags != RTEMS_LIBIO_PERMS_READ) && (flags != RTEMS_LIBIO_PERMS_WRITE) )
-        rtems_set_errno_and_return_minus_one( EINVAL );
</font>     return 0;
 }
 
<font color='#997700'>@@ -546,6 +551,7 @@
</font>     uint32_t       mode __attribute__((unused))
 )
 {
<font color='#000088'>+    tftpfs_info_t        *fs;
</font>     struct tftpStream    *tp;
     int                  retryCount;
     struct in_addr       farAddress;
<font color='#997700'>@@ -559,71 +565,74 @@
</font>     char                 *hostname;
 
     /*
<font color='#000088'>+     * Get the file system info.
+     */
+    fs = tftpfs_info_iop (iop);
+<span style="background-color: #FF0000">    </span>
+    /*
</font>      * Extract the host name component
      */
<font color='#880000'>-    cp2 = full_path_name;
-    while (*cp2 == '/')
-        cp2++;
-    hostname = cp2;
-    while (*cp2 != '/') {
-        if (*cp2 == '\0')
-            return ENOENT;
-        cp2++;
</font><font color='#000088'>+    hostname = full_path_name;
+    cp1 = strchr (full_path_name, ':');
+    if (!cp1)
+        hostname = "BOOTP_HOST";
+    else {
+        *cp1 = '\0';
+        ++cp1;
</font>     }
<font color='#880000'>-    *cp2++ = '\0';
</font> 
     /*
      * Convert hostname to Internet address
      */
     if (strcmp (hostname, "BOOTP_HOST") == 0)
         farAddress = rtems_bsdnet_bootp_server_address;
<font color='#880000'>-    else
-        farAddress.s_addr = inet_addr (hostname);
-    if ((farAddress.s_addr == INADDR_ANY) || (farAddress.s_addr == INADDR_BROADCAST))
</font><font color='#000088'>+    else if (inet_aton (hostname, &farAddress) == 0) {
+        struct hostent *he = gethostbyname(hostname);
+        if (he == NULL)
+            return ENOENT;
+        memcpy (&farAddress, he->h_addr, sizeof (farAddress));
+    } else {
</font>         return ENOENT;
<font color='#880000'>-
</font><font color='#000088'>+    }
+<span style="background-color: #FF0000">    </span>
</font>     /*
      * Extract file pathname component
      */
<font color='#880000'>-    while (*cp2 == '/')
-        cp2++;
-    if (strcmp (cp2, "BOOTP_FILE") == 0) {
-        cp2 = rtems_bsdnet_bootp_boot_file_name;
-        while (*cp2 == '/')
-            cp2++;
</font><font color='#000088'>+    if (strcmp (cp1, "BOOTP_FILE") == 0) {
+        cp1 = rtems_bsdnet_bootp_boot_file_name;
</font>     }
<font color='#880000'>-    if (*cp2 == '\0')
</font><font color='#000088'>+    if (*cp1 == '\0')
</font>         return ENOENT;
<font color='#880000'>-    remoteFilename = cp2;
</font><font color='#000088'>+    remoteFilename = cp1;
</font>     if (strlen (remoteFilename) > (TFTP_BUFSIZE - 10))
         return ENOENT;
 
     /*
      * Find a free stream
      */
<font color='#880000'>-    sc = rtems_semaphore_obtain (tftp_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
</font><font color='#000088'>+    sc = rtems_semaphore_obtain (fs->tftp_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
</font>     if (sc != RTEMS_SUCCESSFUL)
         return EBUSY;
<font color='#880000'>-    for (s = 0 ; s < nStreams ; s++) {
-        if (tftpStreams[s] == NULL)
</font><font color='#000088'>+    for (s = 0 ; s < fs->nStreams ; s++) {
+        if (fs->tftpStreams[s] == NULL)
</font>         break;
     }
<font color='#880000'>-    if (s == nStreams) {
</font><font color='#000088'>+    if (s == fs->nStreams) {
</font>         /*
          * Reallocate stream pointers
          * Guard against the case where realloc() returns NULL.
          */
         struct tftpStream **np;
 
<font color='#880000'>-        np = realloc (tftpStreams, ++nStreams * sizeof *tftpStreams);
</font><font color='#000088'>+        np = realloc (fs->tftpStreams, ++fs->nStreams * sizeof *fs->tftpStreams);
</font>         if (np == NULL) {
<font color='#880000'>-            rtems_semaphore_release (tftp_mutex);
</font><font color='#000088'>+            rtems_semaphore_release (fs->tftp_mutex);
</font>             return ENOMEM;
         }
<font color='#880000'>-        tftpStreams = np;
</font><font color='#000088'>+        fs->tftpStreams = np;
</font>     }
<font color='#880000'>-    tp = tftpStreams[s] = malloc (sizeof (struct tftpStream));
-    rtems_semaphore_release (tftp_mutex);
</font><font color='#000088'>+    tp = fs->tftpStreams[s] = malloc (sizeof (struct tftpStream));
+    rtems_semaphore_release (fs->tftp_mutex);
</font>     if (tp == NULL)
         return ENOMEM;
     iop->data0 = s;
<font color='#997700'>@@ -633,7 +642,7 @@
</font>      * Create the socket
      */
     if ((tp->socket = socket (AF_INET, SOCK_DGRAM, 0)) < 0) {
<font color='#880000'>-        releaseStream (s);
</font><font color='#000088'>+        releaseStream (fs, s);
</font>         return ENOMEM;
     }
 
<font color='#997700'>@@ -646,13 +655,12 @@
</font>         int try = (now + retryCount) % 10;
 
         tp->myAddress.sin_family = AF_INET;
<font color='#880000'>-        tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try + s);
</font><font color='#000088'>+        tp->myAddress.sin_port = htons (UDP_PORT_BASE + fs->nStreams * try + s);
</font>         tp->myAddress.sin_addr.s_addr = htonl (INADDR_ANY);
         if (bind (tp->socket, (struct sockaddr *)&tp->myAddress, sizeof tp->myAddress) >= 0)
             break;
         if (++retryCount == 10) {
<font color='#880000'>-            close (tp->socket);
-            releaseStream (s);
</font><font color='#000088'>+            releaseStream (fs, s);
</font>             return EBUSY;
         }
     }
<font color='#997700'>@@ -697,8 +705,7 @@
</font>         if (sendto (tp->socket, (char *)&tp->pkbuf, len, 0,
                     (struct sockaddr *)&tp->farAddress,
                     sizeof tp->farAddress) < 0) {
<font color='#880000'>-            close (tp->socket);
-            releaseStream (s);
</font><font color='#000088'>+            releaseStream (fs, s);
</font>             return EIO;
         }
 
<font color='#997700'>@@ -716,8 +723,7 @@
</font>                 tp->nleft = len - 2 * sizeof (uint16_t  );
                 tp->eof = (tp->nleft < TFTP_BUFSIZE);
                 if (sendAck (tp) != 0) {
<font color='#880000'>-                    close (tp->socket);
-                    releaseStream (s);
</font><font color='#000088'>+                    releaseStream (fs, s);
</font>                     return EIO;
                 }
                 break;
<font color='#997700'>@@ -731,8 +737,7 @@
</font>             }
             if (opcode == TFTP_OPCODE_ERROR) {
                 int e = tftpErrno (tp);
<font color='#880000'>-                close (tp->socket);
-                releaseStream (s);
</font><font color='#000088'>+                releaseStream (fs, s);
</font>                 return e;
             }
         }
<font color='#997700'>@@ -741,8 +746,7 @@
</font>          * Keep trying
          */
         if (++retryCount >= OPEN_RETRY_LIMIT) {
<font color='#880000'>-            close (tp->socket);
-            releaseStream (s);
</font><font color='#000088'>+            releaseStream (fs, s);
</font>             return EIO;
         }
     }
<font color='#997700'>@@ -759,36 +763,81 @@
</font>     uint32_t       mode
 )
 {
<font color='#880000'>-    char *full_path_name;
-    char *s1;
-    int err;
-
-    /*
-     * Tack the `current directory' on to relative paths.
-     * We know that the current directory ends in a / character.
-     */
-    if (*new_name == '/') {
-        /*
-         * Skip the TFTP filesystem prefix.
-         */
-        int len = strlen (TFTP_PATHNAME_PREFIX);
-        if (strncmp (new_name, TFTP_PATHNAME_PREFIX, len))
-            return ENOENT;
-        new_name += len;
-        s1 = "";
-    }
</font><font color='#000088'>+    tftpfs_info_t *fs;
+    const char    *device;
+    char          *full_path_name;
+    char          *na;
+    char          *na2;
+    int           dlen;
+    int           nalen;
+    int           na2len;
+    int           sep1;
+    int           err;
+
+    /*
+     * Get the file system info.
+     */
+    fs = tftpfs_info_iop (iop);
+<span style="background-color: #FF0000">    </span>
+    /*
+     * Tack the prefix directory if one exists from the device name.
+     */
+    device =
+      rtems_filesystem_mount_device (rtems_filesystem_location_mount (&iop->pathinfo));
+    dlen = strlen (device);
+    if (dlen == 0)
+        rtems_set_errno_and_return_minus_one (ENOENT);
+
+    if (iop->pathinfo.node_access_2 == NULL)
+        rtems_set_errno_and_return_minus_one (ENOENT);
+
+    if (iop->pathinfo.node_access != ROOT_NODE_ACCESS (fs)) {
+        na = iop->pathinfo.node_access;
+        nalen = strlen (na);
+    }<span style="background-color: #FF0000">     </span>
</font>     else {
<font color='#880000'>-        s1 = rtems_filesystem_current.node_access;
</font><font color='#000088'>+        na = NULL;
+        nalen = 0;
+    }
+
+    na2 = iop->pathinfo.node_access_2;
+<span style="background-color: #FF0000">    </span>
+    na2len = strlen (na2);
+
+    if (nalen) {
+      sep1 = 1;
+        if (na[nalen] == '/') {
+            sep1 = 0;
+            if (na2[0] == '/')
+                ++na2;
+        }
+        else {
+            if (na2[0] == '/')
+                sep1 = 0;
+            else
+                sep1 = 1;
+        }
</font>     }
<font color='#880000'>-    full_path_name = malloc (strlen (s1) + strlen (new_name) + 1);
</font><font color='#000088'>+    else
+      sep1 = 0;
+
+    full_path_name = malloc (dlen + nalen + sep1 + na2len + 1);
</font>     if (full_path_name == NULL)
<font color='#880000'>-        return ENOMEM;
-    strcpy (full_path_name, s1);
-    strcat (full_path_name, new_name);
</font><font color='#000088'>+        rtems_set_errno_and_return_minus_one(ENOMEM);
+    strcpy (full_path_name, device);
+    if (nalen)
+      strcat (full_path_name, na);
+    if (sep1)
+        strcat (full_path_name, "/");
+    strcat (full_path_name, na2);
</font>     fixPath (full_path_name);
<font color='#000088'>+
+    if (fs->flags & TFTPFS_VERBOSE)
+      printf ("TFTPFS: %s %s %s -> %s\n", device, na, na2, full_path_name);
+
</font>     err = rtems_tftp_open_worker (iop, full_path_name, flags, mode);
     free (full_path_name);
<font color='#880000'>-    return err;
</font><font color='#000088'>+    rtems_set_errno_and_return_minus_one(err);
</font> }
 
 /*
<font color='#997700'>@@ -805,7 +854,9 @@
</font>     int               retryCount;
     int               nwant;
 
<font color='#880000'>-
</font><font color='#000088'>+    if (!tp)
+        rtems_set_errno_and_return_minus_one( EIO );
+<span style="background-color: #FF0000">    </span>
</font>     /*
      * Read till user request is satisfied or EOF is reached
      */
<font color='#997700'>@@ -841,24 +892,24 @@
</font>                 if ((opcode == TFTP_OPCODE_DATA)
                  && (ntohs (tp->pkbuf.tftpDATA.blocknum) == nextBlock)) {
                     tp->nused = 0;
<font color='#880000'>-                    tp->nleft = len - 2 * sizeof (uint16_t  );
</font><font color='#000088'>+                    tp->nleft = len - 2 * sizeof (uint16_t);
</font>                     tp->eof = (tp->nleft < TFTP_BUFSIZE);
                     tp->blocknum++;
                     if (sendAck (tp) != 0)
<font color='#880000'>-                        rtems_set_errno_and_return_minus_one( EIO );
</font><font color='#000088'>+                        rtems_set_errno_and_return_minus_one (EIO);
</font>                     break;
                 }
                 if (opcode == TFTP_OPCODE_ERROR)
<font color='#880000'>-                        rtems_set_errno_and_return_minus_one( tftpErrno (tp) );
</font><font color='#000088'>+                    rtems_set_errno_and_return_minus_one (tftpErrno (tp));
</font>             }
 
             /*
              * Keep trying?
              */
             if (++retryCount == IO_RETRY_LIMIT)
<font color='#880000'>-                rtems_set_errno_and_return_minus_one( EIO );
</font><font color='#000088'>+                rtems_set_errno_and_return_minus_one (EIO);
</font>             if (sendAck (tp) != 0)
<font color='#880000'>-                rtems_set_errno_and_return_minus_one( EIO );
</font><font color='#000088'>+                rtems_set_errno_and_return_minus_one (EIO);
</font>         }
     }
     return count - nwant;
<font color='#997700'>@@ -867,7 +918,7 @@
</font> /*
  * Flush a write buffer and wait for acknowledgement
  */
<font color='#880000'>-static int rtems_tftp_flush ( struct tftpStream *tp )
</font><font color='#000088'>+static int rtems_tftp_flush (struct tftpStream *tp)
</font> {
     int wlen, rlen;
     int retryCount = 0;
<font color='#997700'>@@ -917,10 +968,20 @@
</font>     rtems_libio_t *iop
 )
 {
<font color='#880000'>-    struct tftpStream *tp = iop->data1;;
-
</font><font color='#000088'>+    tftpfs_info_t     *fs;
+    struct tftpStream *tp = iop->data1;
+    int                e = 0;
+<span style="background-color: #FF0000">    </span>
+    /*
+     * Get the file system info.
+     */
+    fs = tftpfs_info_iop (iop);
+<span style="background-color: #FF0000">    </span>
+    if (!tp)<span style="background-color: #FF0000"> </span>
+        rtems_set_errno_and_return_minus_one (EIO);
+<span style="background-color: #FF0000">    </span>
</font>     if (tp->writing)
<font color='#880000'>-        rtems_tftp_flush (tp);
</font><font color='#000088'>+        e = rtems_tftp_flush (tp);
</font>     if (!tp->eof && !tp->firstReply) {
         /*
          * Tell the other end to stop
<font color='#997700'>@@ -930,9 +991,8 @@
</font>         ticksPerSecond = rtems_clock_get_ticks_per_second();
         rtems_task_wake_after (1 + ticksPerSecond / 10);
     }
<font color='#880000'>-    close (tp->socket);
-    releaseStream (iop->data0);
-    return RTEMS_SUCCESSFUL;
</font><font color='#000088'>+    releaseStream (fs, iop->data0);
+    rtems_set_errno_and_return_minus_one (e);
</font> }
 
 static ssize_t rtems_tftp_write(
<font color='#997700'>@@ -949,8 +1009,7 @@
</font>      * Bail out if an error has occurred
      */
     if (!tp->writing)
<font color='#880000'>-        return EIO;
-
</font><font color='#000088'>+        rtems_set_errno_and_return_minus_one (EIO);
</font> 
     /*
      * Write till user request is satisfied
<font color='#997700'>@@ -997,8 +1056,10 @@
</font>      rtems_filesystem_location_info_t        *pathloc                 /* IN */
 )
 {
<font color='#000088'>+    tftpfs_info_t *fs = tftpfs_info_pathloc (pathloc);
</font>     if ((pathloc->node_access == NULL)
<font color='#880000'>-     || (pathloc->node_access == ROOT_NODE_ACCESS))
</font><font color='#000088'>+     || (pathloc->node_access_2 != NULL)
+        || (pathloc->node_access == ROOT_NODE_ACCESS (fs)))
</font>         return RTEMS_FILESYSTEM_MEMORY_FILE;
     return RTEMS_FILESYSTEM_DIRECTORY;
 }
<font color='#997700'>@@ -1007,10 +1068,16 @@
</font>      rtems_filesystem_location_info_t        *pathloc                 /* IN */
 )
 {
<font color='#880000'>-    if (pathloc->node_access && (pathloc->node_access != ROOT_NODE_ACCESS)) {
</font><font color='#000088'>+    tftpfs_info_t *fs = tftpfs_info_pathloc (pathloc);
+    if (pathloc->node_access && \
+        (pathloc->node_access != ROOT_NODE_ACCESS (fs))) {
</font>         free (pathloc->node_access);
         pathloc->node_access = NULL;
     }
<font color='#000088'>+    if (pathloc->node_access_2) {
+        free (pathloc->node_access_2);
+        pathloc->node_access_2 = NULL;
+    }
</font>     return 0;
 }
 
<font color='#997700'>@@ -1025,9 +1092,9 @@
</font>     NULL,                            /* chown */
     rtems_tftp_free_node_info,       /* freenodinfo */
     NULL,                            /* mount */
<font color='#880000'>-    rtems_tftp_mount_me,             /* initialize */
</font><font color='#000088'>+    rtems_tftpfs_initialize,         /* initialize */
</font>     NULL,                            /* unmount */
<font color='#880000'>-    NULL,                            /* fsunmount */
</font><font color='#000088'>+    rtems_tftpfs_shutdown,           /* fsunmount */
</font>     NULL,                            /* utime, */
     NULL,                            /* evaluate_link */
     NULL,                            /* symlink */
<font color='#997700'>@@ -1035,18 +1102,18 @@
</font> };
 
 rtems_filesystem_file_handlers_r rtems_tftp_handlers = {
<font color='#880000'>-    rtems_tftp_open,   /* open */
-    rtems_tftp_close,  /* close */
-    rtems_tftp_read,   /* read */
-    rtems_tftp_write,  /* write */
-    NULL,              /* ioctl */
-    NULL,              /* lseek */
-    NULL,              /* fstat */
-    NULL,              /* fchmod */
</font><font color='#000088'>+    rtems_tftp_open,      /* open */
+    rtems_tftp_close,     /* close */
+    rtems_tftp_read,      /* read */
+    rtems_tftp_write,     /* write */
+    NULL,                 /* ioctl */
+    NULL,                 /* lseek */
+    NULL,                 /* fstat */
+    NULL,                 /* fchmod */
</font>     rtems_tftp_ftruncate, /* ftruncate */
<font color='#880000'>-    NULL,              /* fpathconf */
-    NULL,              /* fsync */
-    NULL,              /* fdatasync */
-    NULL,              /* fcntl */
-    NULL               /* rmnod */
</font><font color='#000088'>+    NULL,                 /* fpathconf */
+    NULL,                 /* fsync */
+    NULL,                 /* fdatasync */
+    NULL,                 /* fcntl */
+    NULL                  /* rmnod */
</font> };

<font color='#006600'>diff -u rtems/cpukit/libnetworking/rtems/ftpfs.h:1.9 rtems/cpukit/libnetworking/rtems/ftpfs.h:1.10
--- rtems/cpukit/libnetworking/rtems/ftpfs.h:1.9        Thu May  7 09:40:55 2009
+++ rtems/cpukit/libnetworking/rtems/ftpfs.h    Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -99,16 +99,6 @@
</font> extern const rtems_filesystem_operations_table rtems_ftpfs_ops;
 
 /**
<font color='#880000'>- * Creates the mount point @a mount_point and mounts the FTP file system.
- *
- * If @a mount_point is @c NULL the default mount point
- * @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
- *
- * It is mounted with read and write access.
- */
-rtems_status_code rtems_ftpfs_mount( const char *mount_point);
-
-/**
</font>  * Returns in @a verbose if the verbose mode is enabled or disabled for the
  * file system at @a mount_point.
  *
<font color='#997700'>@@ -160,15 +150,12 @@
</font> 
 /**
  * Creates the default mount point @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT and
<font color='#880000'>- * mounts the FTP file system.
</font><font color='#000088'>+ * mounts the FTP file system. Do not call directly, use mount.xs
</font>  *
  * It is mounted with read and write access.
<font color='#880000'>- *
- * On success, zero is returned.  On error, -1 is returned.
- *
- * @deprecated Use rtems_ftpfs_mount() instead.
</font>  */
<font color='#880000'>-int rtems_bsdnet_initialize_ftp_filesystem( void);
</font><font color='#000088'>+int rtems_ftpfs_initialize(rtems_filesystem_mount_table_entry_t *e,
+                           const void                           *d);
</font> 
 #ifdef __cplusplus
 }

<font color='#006600'>diff -u rtems/cpukit/libnetworking/rtems/tftp.h:1.6 rtems/cpukit/libnetworking/rtems/tftp.h:1.7
--- rtems/cpukit/libnetworking/rtems/tftp.h:1.6 Sun Dec 16 18:12:01 2007
+++ rtems/cpukit/libnetworking/rtems/tftp.h     Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -20,7 +20,8 @@
</font>  * To open `/bootfiles/image' on `hostname' for reading:
  *         fd = open ("/TFTP/hostname/bootfiles/image", O_RDONLY);
  *
<font color='#880000'>- * The `hostname' must be four dot-separated decimal values.
</font><font color='#000088'>+ * The 'TFTP' is the mount path and the `hostname' must be four dot-separated
+ * decimal values.
</font>  */
 
 #ifndef _RTEMS_TFTP_H
<font color='#997700'>@@ -33,6 +34,11 @@
</font> #include <rtems/libio.h>
 
 /*
<font color='#000088'>+ * Filesystem Mount table entry.
+ */
+int rtems_tftpfs_initialize(rtems_filesystem_mount_table_entry_t *temp_mt_entry);
+
+/*
</font>  * Filesystem initialization routine
  */
 

<font color='#006600'>diff -u rtems/cpukit/sapi/include/confdefs.h:1.132 rtems/cpukit/sapi/include/confdefs.h:1.133
--- rtems/cpukit/sapi/include/confdefs.h:1.132  Mon May  3 04:13:36 2010
+++ rtems/cpukit/sapi/include/confdefs.h        Mon May 31 08:56:37 2010
</font><font color='#997700'>@@ -174,13 +174,192 @@
</font>   extern int rtems_telnetd_maximum_ptys;
 #endif
 
<font color='#000088'>+/*
+ *  Filesystems and Mount Table Configuration.
+ *
+ *  Defines to control the file system:
+ *
+ *   CONFIGURE_APPLICATION_DISABLE_FILESYSTEM:
+ *     Disable the RTEMS filesystems. You get an empty DEVFS.
+ *
+ *   CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM:
+ *     Use the DEVFS as the root file system. Limited functions are
+ *     provided when this is used.
+ *
+ *   CONFIGURE_FILESYSTEM_ALL:
+ *     Add file filesystems to the default filesystem table.
+ *
+ *   List of available file systems. You can define as many as you like:
+ *     CONFIGURE_FILESYSTEM_miniIMFS - MiniIMFS, use DEVFS now
+ *     CONFIGURE_FILESYSTEM_IMFS     - In Memory File System (IMFS)
+ *     CONFIGURE_FILESYSTEM_DEVFS    - Device File System (DSVFS)
+ *     CONFIGURE_FILESYSTEM_TFTPFS   - TFTP File System, networking enabled
+ *     CONFIGURE_FILESYSTEM_FTPFS    - FTP File System, networking enabled
+ *     CONFIGURE_FILESYSTEM_NFSFS    - Network File System, networking enabled
+ *     CONFIGURE_FILESYSTEM_DOSFS    - DOS File System, uses libblock
+ *     CONFIGURE_FILESYSTEM_RFS      - RTEMS File System (RFS), uses libblock
+ *
+ *   Combinations:
+ *
+ *    - If nothing is defined the base file system is the IMFS.
+ *
+ *    - If CONFIGURE_APPLICATION_DISABLE_FILESYSTEM is defined all filesystem
+ *      are disabled by force and an empty DEVFS is created.
+ *
+ *    - If CONFIGURE_USE_DEV_AS_BASE_FILESYSTEM is defined all filesystem
+ *      are disabled by force and DEVFS is defined.
+ */
+
</font> #ifdef CONFIGURE_INIT
<font color='#880000'>-  #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
-    #if defined(RTEMS_COVERAGE)
-      uint32_t rtems_device_table_size = 0;
-    #endif
</font><font color='#000088'>+
+  /*
+   * Include all file systems. Do this before checking if the filesystem has
+   * been disabled.
+   */
+  #ifdef CONFIGURE_FILESYSTEM_ALL
+    #define CONFIGURE_FILESYSTEM_miniIMFS
+    #define CONFIGURE_FILESYSTEM_IMFS
+    #define CONFIGURE_FILESYSTEM_DEVFS
+    #define CONFIGURE_FILESYSTEM_TFTPFS
+    #define CONFIGURE_FILESYSTEM_FTPFS
+    #define CONFIGURE_FILESYSTEM_NFSFS
+    #define CONFIGURE_FILESYSTEM_DOSFS
+    #define CONFIGURE_FILESYSTEM_RFS
+  #endif
+
+  /*
+   * If disabling the file system undef everything. If DEVFS as the base
+   * filesystem undefine all other filesystems because you cannot mount other
+   * filesystems.
+   */
+  #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) || \
+      defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
+    #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM)
+      #undef CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
+    #endif
+    #undef CONFIGURE_FILESYSTEM_miniIMFS
+    #undef CONFIGURE_FILESYSTEM_IMFS
+    #undef CONFIGURE_FILESYSTEM_DEVFS
+    #undef CONFIGURE_FILESYSTEM_TFTPFS
+    #undef CONFIGURE_FILESYSTEM_FTPFS
+    #undef CONFIGURE_FILESYSTEM_NFSFS
+    #undef CONFIGURE_FILESYSTEM_DOSFS
+    #undef CONFIGURE_FILESYSTEM_RFS
+  #endif
+
+  /*
+   * If the base filesystem is DEVFS define it else define IMFS.
+   * We will have either DEVFS or IMFS defined after this.
+   */
+  #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) && \
+      !defined(CONFIGURE_FILESYSTEM_DEVFS)
+    #define CONFIGURE_FILESYSTEM_DEVFS
+  #elif !defined(CONFIGURE_FILESYSTEM_IMFS)
+    #define CONFIGURE_FILESYSTEM_IMFS
+  #endif
+
+#endif
+
+/**
+ * IMFS
+ */
+#include <rtems/imfs.h>
+
+/**
+ *  This specifies the number of bytes per block for files within the IMFS.
+ *  There are a maximum number of blocks per file so this dictates the maximum
+ *  size of a file.  This has to be balanced with the unused portion of each
+ *  block that might be wasted.
+ */
+#ifndef CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
+  #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK \
+                    IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK
+#endif
+
+#ifdef CONFIGURE_INIT
+  int imfs_rq_memfile_bytes_per_block = CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK;
+#endif /* CONFIGURE_INIT */
+
+/**
+ *  This defines the miniIMFS file system table entry.
+ */<span style="background-color: #FF0000"> </span>
+#if !defined(CONFIGURE_FILESYSTEM_ENTRY_miniIMFS) && \
+    defined(CONFIGURE_FILESYSTEM_miniIMFS)
+#define CONFIGURE_FILESYSTEM_ENTRY_miniIMFS { "mimfs", miniIMFS_initialize }
+#endif
+
+/**
+ *  This defines the IMFS file system table entry.
+ */<span style="background-color: #FF0000"> </span>
+#if !defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) && \
+    defined(CONFIGURE_FILESYSTEM_IMFS)
+#define CONFIGURE_FILESYSTEM_ENTRY_IMFS { "imfs", IMFS_initialize }
+#endif
+
+/**
+ * DEVFS
+ */<span style="background-color: #FF0000"> </span>
+#if !defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS) && \
+    defined(CONFIGURE_FILESYSTEM_DEVFS)
+#include <rtems/devfs.h>
+#define CONFIGURE_FILESYSTEM_ENTRY_DEVFS { "devfs", devFS_initialize }
+#endif
+
+#ifdef RTEMS_NETWORKING
+  /**
+   * FTPFS
+   */<span style="background-color: #FF0000"> </span>
+  #if !defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS) && \
+      defined(CONFIGURE_FILESYSTEM_FTPFS)<span style="background-color: #FF0000"> </span>
+    #include <rtems/ftpfs.h>
+    #define CONFIGURE_FILESYSTEM_ENTRY_FTPFS { "ftpfs", rtems_ftpfs_initialize }
+  #endif
+
+  /**
+   * TFTPFS
+   */<span style="background-color: #FF0000"> </span>
+  #if !defined(CONFIGURE_FILESYSTEM_ENTRY_TFTPFS) && \
+      defined(CONFIGURE_FILESYSTEM_TFTPFS)
+    #include <rtems/tftp.h>
+    #define CONFIGURE_FILESYSTEM_ENTRY_TFTPFS { "tftpfs", rtems_tftpfs_initialize }
+  #endif
+
+  /**
+   * NFSFS
+   */<span style="background-color: #FF0000"> </span>
+  #if !defined(CONFIGURE_FILESYSTEM_ENTRY_NFSFS) && \
+      defined(CONFIGURE_FILESYSTEM_NFSFS)
+    #include <librtemsNfs.h>
+    #define CONFIGURE_FILESYSTEM_ENTRY_NFSFS { "nfs", rtems_nfsfs_initialize }
+  #endif
+#endif
+
+/**
+ * DOSFS
+ */<span style="background-color: #FF0000"> </span>
+#if !defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS) && \
+    defined(CONFIGURE_FILESYSTEM_DOSFS)
+  #include <rtems/dosfs.h>
+  #define CONFIGURE_FILESYSTEM_ENTRY_DOSFS { "dosfs", rtems_dosfs_initialize }
+#endif
+
+/**
+ * RFS
+ */<span style="background-color: #FF0000"> </span>
+#if !defined(CONFIGURE_FILESYSTEM_ENTRY_RFS) && \
+    defined(CONFIGURE_FILESYSTEM_RFS)
+  #include <rtems/rtems-rfs.h>
+  #define CONFIGURE_FILESYSTEM_ENTRY_RFS { "rfs", rtems_rfs_rtems_initialise }
+#endif
+
+#ifdef CONFIGURE_INIT
+
+  /*
+   *  DEVFS variables.
+   */
+  #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) && !defined(RTEMS_COVERAGE)
</font>     #define CONFIGURE_MEMORY_FOR_DEVFS  0
<font color='#880000'>-  #elif defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
</font><font color='#000088'>+  #elif defined(CONFIGURE_FILESYSTEM_DEVFS)
</font>     #ifndef CONFIGURE_MAXIMUM_DEVICES
       #define CONFIGURE_MAXIMUM_DEVICES 4
     #endif
<font color='#997700'>@@ -195,28 +374,54 @@
</font>   #else
     #define CONFIGURE_MEMORY_FOR_DEVFS  0
   #endif
<font color='#880000'>-#endif
</font> 
<font color='#880000'>-/*
- *  Mount Table Configuration
- */
-#include <rtems/imfs.h>
</font><font color='#000088'>+  /**
+   * Table termination record.
+   */
+  #define CONFIGURE_FILESYSTEM_NULL { NULL, NULL }
</font> 
<font color='#880000'>-/**
- *  This specifies the number of bytes per block for files within
- *  the IMFS.  There are a maximum number of blocks per file so
- *  this dictates the maximum size of a file.  This has to be balanced
- *  with the unused portion of each block that might be wasted.
- */
-#ifndef CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
-  #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK \
-                    IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK
-#endif
-#ifdef CONFIGURE_INIT
-  int imfs_rq_memfile_bytes_per_block = CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK;
-#endif /* CONFIGURE_INIT */
</font><font color='#000088'>+  /**
+   * The default file system table. Must be terminated with the NULL entry if
+   * you provide your own.
+   */
+  #ifndef CONFIGURE_HAS_OWN_FILESYSTEM_TABLE
+    const rtems_filesystem_table_t configuration_filesystem_table[] = {
+      #if defined(CONFIGURE_FILESYSTEM_miniIMFS) && \
+          defined(CONFIGURE_FILESYSTEM_ENTRY_miniIMFS)
+        CONFIGURE_FILESYSTEM_ENTRY_miniIMFS,
+      #endif
+      #if defined(CONFIGURE_FILESYSTEM_IMFS) && \
+          defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS)
+        CONFIGURE_FILESYSTEM_ENTRY_IMFS,
+      #endif
+      #if defined(CONFIGURE_FILESYSTEM_DEVFS) && \
+          defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS)
+        CONFIGURE_FILESYSTEM_ENTRY_DEVFS,
+      #endif
+      #if defined(CONFIGURE_FILESYSTEM_TFTPFS) && \
+          defined(CONFIGURE_FILESYSTEM_ENTRY_TFTPFS)
+        CONFIGURE_FILESYSTEM_ENTRY_TFTPFS,
+      #endif
+      #if defined(CONFIGURE_FILESYSTEM_FTPFS) && \
+          defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS)
+        CONFIGURE_FILESYSTEM_ENTRY_FTPFS,
+      #endif
+      #if defined(CONFIGURE_FILESYSTEM_NFSFS) && \
+          defined(CONFIGURE_FILESYSTEM_ENTRY_NFSFS)
+        CONFIGURE_FILESYSTEM_ENTRY_NFSFS,
+      #endif
+      #if defined(CONFIGURE_FILESYSTEM_DOSFS) && \
+          defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS)
+        CONFIGURE_FILESYSTEM_ENTRY_DOSFS,
+      #endif
+      #if defined(CONFIGURE_FILESYSTEM_RFS) && \
+          defined(CONFIGURE_FILESYSTEM_ENTRY_RFS)
+        CONFIGURE_FILESYSTEM_ENTRY_RFS,
+      #endif
+      CONFIGURE_FILESYSTEM_NULL
+    };
+  #endif
</font> 
<font color='#880000'>-#ifdef CONFIGURE_INIT
</font>   /**
    *  This disables the inclusion of pipe support in the full IMFS.
    *
<font color='#997700'>@@ -234,11 +439,11 @@
</font>   #ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE
     const rtems_filesystem_mount_table_t configuration_mount_table = {
       #ifdef CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
<font color='#880000'>-        &IMFS_ops,
</font><font color='#000088'>+        "imfs",
</font>       #elif defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
<font color='#880000'>-        &devFS_ops,
</font><font color='#000088'>+        "devfs",
</font>       #else  /* using miniIMFS as base filesystem */
<font color='#880000'>-        &miniIMFS_ops,
</font><font color='#000088'>+        "mimfs",
</font>       #endif
       RTEMS_FILESYSTEM_READ_WRITE,
       NULL,
<font color='#997700'>@@ -249,6 +454,7 @@
</font>         *rtems_filesystem_mount_table = &configuration_mount_table;
     const int rtems_filesystem_mount_table_size = 1;
   #endif
<font color='#000088'>+
</font> #endif
 
 /*
</pre>
<p> </p>
<a name='cs3'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-05-31 Joel Sherrill <joel.sherrilL@OARcorp.com>

        * start/start.S: Pass 0/NULL for argc/argv.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/m32r/m32rsim/ChangeLog.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>c/src/lib/libbsp/m32r/m32rsim/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/m32r/m32rsim/start/start.S.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>c/src/lib/libbsp/m32r/m32rsim/start/start.S</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/m32r/m32rsim/ChangeLog:1.8 rtems/c/src/lib/libbsp/m32r/m32rsim/ChangeLog:1.9
--- rtems/c/src/lib/libbsp/m32r/m32rsim/ChangeLog:1.8   Wed Oct 21 05:46:51 2009
+++ rtems/c/src/lib/libbsp/m32r/m32rsim/ChangeLog       Mon May 31 08:52:07 2010
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2010-05-31    Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+       * start/start.S: Pass 0/NULL for argc/argv.
+
</font> 2009-10-21        Ralf Corsépius <ralf.corsepius@rtems.org>
 
        * make/custom/m32rsim.cfg: Remove RTEMS_BSP_FAMILY.

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/m32r/m32rsim/start/start.S:1.3 rtems/c/src/lib/libbsp/m32r/m32rsim/start/start.S:1.4
--- rtems/c/src/lib/libbsp/m32r/m32rsim/start/start.S:1.3       Sun Nov 29 22:56:52 2009
+++ rtems/c/src/lib/libbsp/m32r/m32rsim/start/start.S   Mon May 31 08:52:07 2010
</font><font color='#997700'>@@ -4,11 +4,6 @@
</font>  *  $Id$
  */
 
<font color='#880000'>-#warning Call to boot_card has changed and needs checking.
-#warning The call is "void boot_card(const char* cmdline);"
-#warning You need to pass a NULL.
-#warning Please check and remove these warnings.
-
</font>   .text
        .balign 4
        .global _start
<font color='#997700'>@@ -54,6 +49,8 @@
</font> 
 # Call main, then exit.
 
<font color='#000088'>+   ldi     r1, #0           ; r1 = argv
+       ldi     r0, #0           ; r0 = argc
</font>   bl      boot_card
        bl      sys_exit
 
</pre>
<p> </p>
<a name='cs4'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-05-31 Ralf Corsépius <ralf.corsepius@rtems.org>

        * libchip/network/greth.c: Misc. hacks to allow compilation on
        16bit targets.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/ChangeLog.diff?r1=text&tr1=1.517&r2=text&tr2=1.518&diff_format=h">M</a></td><td width='1%'>1.518</td><td width='100%'>c/src/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/libchip/network/greth.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>c/src/libchip/network/greth.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/ChangeLog:1.517 rtems/c/src/ChangeLog:1.518
--- rtems/c/src/ChangeLog:1.517 Mon May 31 07:22:38 2010
+++ rtems/c/src/ChangeLog       Mon May 31 08:27:07 2010
</font><font color='#997700'>@@ -1,5 +1,10 @@
</font> 2010-05-31        Ralf Corsépius <ralf.corsepius@rtems.org>
 
<font color='#000088'>+   * libchip/network/greth.c: Misc. hacks to allow compilation on<span style="background-color: #FF0000"> </span>
+       16bit targets.
+
+2010-05-31     Ralf Corsépius <ralf.corsepius@rtems.org>
+
</font>   PR 1531/newlib
        * libchip/network/i82586.c:
        Add local copy of ALIGN().

<font color='#006600'>diff -u rtems/c/src/libchip/network/greth.c:1.9 rtems/c/src/libchip/network/greth.c:1.10
--- rtems/c/src/libchip/network/greth.c:1.9     Thu Dec 17 14:35:40 2009
+++ rtems/c/src/libchip/network/greth.c Mon May 31 08:27:07 2010
</font><font color='#997700'>@@ -169,7 +169,7 @@
</font> {
         char *tmp;
         tmp = calloc(1,2*sz);
<font color='#880000'>-        tmp = (char *) (((int)tmp+sz) & ~(sz -1));
</font><font color='#000088'>+        tmp = (char *) (((uintptr_t)tmp+sz) & ~(sz -1));
</font>         return(tmp);
 }
 
<font color='#997700'>@@ -416,8 +416,8 @@
</font>     sc->tx_dptr = 0;
     sc->tx_cnt = 0;
     sc->rx_ptr = 0;
<font color='#880000'>-    regs->txdesc = (int) sc->txdesc;
-    regs->rxdesc = (int) sc->rxdesc;
</font><font color='#000088'>+    regs->txdesc = (uintptr_t) sc->txdesc;
+    regs->rxdesc = (uintptr_t) sc->rxdesc;
</font> 
     sc->rxmbuf = calloc(sc->rxbufs, sizeof(*sc->rxmbuf));
     sc->txmbuf = calloc(sc->txbufs, sizeof(*sc->txmbuf));
<font color='#997700'>@@ -452,9 +452,16 @@
</font>     /* set ethernet address.  */
     regs->mac_addr_msb =
       sc->arpcom.ac_enaddr[0] << 8 | sc->arpcom.ac_enaddr[1];
<font color='#880000'>-    regs->mac_addr_lsb =
-      sc->arpcom.ac_enaddr[2] << 24 | sc->arpcom.ac_enaddr[3] << 16 |
-      sc->arpcom.ac_enaddr[4] << 8 | sc->arpcom.ac_enaddr[5];
</font><font color='#000088'>+
+    uint32_t mac_addr_lsb;
+    mac_addr_lsb = sc->arpcom.ac_enaddr[2];
+    mac_addr_lsb <<= 8;
+    mac_addr_lsb |= sc->arpcom.ac_enaddr[3];
+    mac_addr_lsb <<= 8;
+    mac_addr_lsb |= sc->arpcom.ac_enaddr[4];
+    mac_addr_lsb <<= 8;
+    mac_addr_lsb |= sc->arpcom.ac_enaddr[5];
+    regs->mac_addr_lsb = mac_addr_lsb;
</font> 
     /* install interrupt vector */
     set_vector(greth_interrupt_handler, sc->vector, 1);
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>