<!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-07-01)</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>jennifer</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-07-01 Jennifer Averett <Jennifer.Averett@OARcorp.com>

        * libcsupport/src/chdir.c, libcsupport/src/chmod.c,
        libcsupport/src/chown.c, libcsupport/src/close.c,
        libcsupport/src/eval.c, libcsupport/src/fchdir.c,
        libcsupport/src/fchmod.c, libcsupport/src/fchown.c,
        libcsupport/src/fcntl.c, libcsupport/src/fdatasync.c,
        libcsupport/src/freenode.c, libcsupport/src/fstat.c,
        libcsupport/src/fsync.c, libcsupport/src/ftruncate.c,
        libcsupport/src/ioctl.c, libcsupport/src/link.c,
        libcsupport/src/lseek.c, libcsupport/src/mknod.c,
        libcsupport/src/mount.c, libcsupport/src/open.c,
        libcsupport/src/read.c, libcsupport/src/readlink.c,
        libcsupport/src/readv.c, libcsupport/src/rmdir.c,
        libcsupport/src/stat.c, libcsupport/src/statvfs.c,
        libcsupport/src/symlink.c, libcsupport/src/unlink.c,
        libcsupport/src/unmount.c, libcsupport/src/write.c: Removed
        filesystem checks for NULL methods checks from the main posix
        rountines. These are now required to have at a miminum default
        routines in the tables.
</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.2478&r2=text&tr2=1.2479&diff_format=h">M</a></td><td width='1%'>1.2479</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/chdir.c.diff?r1=text&tr1=1.14&r2=text&tr2=1.15&diff_format=h">M</a></td><td width='1%'>1.15</td><td width='100%'>cpukit/libcsupport/src/chdir.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/chmod.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/libcsupport/src/chmod.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/chown.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>cpukit/libcsupport/src/chown.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/close.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>cpukit/libcsupport/src/close.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/eval.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/libcsupport/src/eval.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/fchdir.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/libcsupport/src/fchdir.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/fchmod.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>cpukit/libcsupport/src/fchmod.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/fchown.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/libcsupport/src/fchown.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/fcntl.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/libcsupport/src/fcntl.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/fdatasync.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/libcsupport/src/fdatasync.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/freenode.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/libcsupport/src/freenode.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/fstat.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/fstat.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/fsync.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/fsync.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/ftruncate.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>cpukit/libcsupport/src/ftruncate.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/ioctl.c.diff?r1=text&tr1=1.15&r2=text&tr2=1.16&diff_format=h">M</a></td><td width='1%'>1.16</td><td width='100%'>cpukit/libcsupport/src/ioctl.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/link.c.diff?r1=text&tr1=1.17&r2=text&tr2=1.18&diff_format=h">M</a></td><td width='1%'>1.18</td><td width='100%'>cpukit/libcsupport/src/link.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/lseek.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/libcsupport/src/lseek.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/mknod.c.diff?r1=text&tr1=1.14&r2=text&tr2=1.15&diff_format=h">M</a></td><td width='1%'>1.15</td><td width='100%'>cpukit/libcsupport/src/mknod.c</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.38&r2=text&tr2=1.39&diff_format=h">M</a></td><td width='1%'>1.39</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/open.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/open.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/read.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/libcsupport/src/read.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/readlink.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/libcsupport/src/readlink.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/readv.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/libcsupport/src/readv.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/rmdir.c.diff?r1=text&tr1=1.17&r2=text&tr2=1.18&diff_format=h">M</a></td><td width='1%'>1.18</td><td width='100%'>cpukit/libcsupport/src/rmdir.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/stat.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/libcsupport/src/stat.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/statvfs.c.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%'>cpukit/libcsupport/src/statvfs.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/symlink.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>cpukit/libcsupport/src/symlink.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/unlink.c.diff?r1=text&tr1=1.19&r2=text&tr2=1.20&diff_format=h">M</a></td><td width='1%'>1.20</td><td width='100%'>cpukit/libcsupport/src/unlink.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.27&r2=text&tr2=1.28&diff_format=h">M</a></td><td width='1%'>1.28</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/libcsupport/src/write.c.diff?r1=text&tr1=1.17&r2=text&tr2=1.18&diff_format=h">M</a></td><td width='1%'>1.18</td><td width='100%'>cpukit/libcsupport/src/write.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2478 rtems/cpukit/ChangeLog:1.2479
--- rtems/cpukit/ChangeLog:1.2478       Thu Jul  1 08:05:15 2010
+++ rtems/cpukit/ChangeLog      Thu Jul  1 10:12:34 2010
</font><font color='#997700'>@@ -1,3 +1,24 @@
</font><font color='#000088'>+2010-07-01    Jennifer Averett <Jennifer.Averett@OARcorp.com>
+
+       * libcsupport/src/chdir.c, libcsupport/src/chmod.c,
+       libcsupport/src/chown.c, libcsupport/src/close.c,
+       libcsupport/src/eval.c, libcsupport/src/fchdir.c,
+       libcsupport/src/fchmod.c, libcsupport/src/fchown.c,
+       libcsupport/src/fcntl.c, libcsupport/src/fdatasync.c,
+       libcsupport/src/freenode.c, libcsupport/src/fstat.c,
+       libcsupport/src/fsync.c, libcsupport/src/ftruncate.c,
+       libcsupport/src/ioctl.c, libcsupport/src/link.c,
+       libcsupport/src/lseek.c, libcsupport/src/mknod.c,
+       libcsupport/src/mount.c, libcsupport/src/open.c,
+       libcsupport/src/read.c, libcsupport/src/readlink.c,
+       libcsupport/src/readv.c, libcsupport/src/rmdir.c,
+       libcsupport/src/stat.c, libcsupport/src/statvfs.c,
+       libcsupport/src/symlink.c, libcsupport/src/unlink.c,
+       libcsupport/src/unmount.c, libcsupport/src/write.c: Removed
+       filesystem checks for NULL methods checks from the main posix
+       rountines. These are now required to have at a miminum default
+       routines in the tables.
+
</font> 2010-07-01        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
        * libcsupport/include/rtems/libio_.h: Removed

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/chdir.c:1.14 rtems/cpukit/libcsupport/src/chdir.c:1.15
--- rtems/cpukit/libcsupport/src/chdir.c:1.14   Wed Apr 28 10:01:31 2010
+++ rtems/cpukit/libcsupport/src/chdir.c        Thu Jul  1 10:12:35 2010
</font><font color='#997700'>@@ -44,11 +44,6 @@
</font>   /*
    * Verify you can change directory into this node.
    */
<font color='#880000'>-  if ( !loc.ops->node_type_h ) {
-    rtems_filesystem_freenode( &loc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   if (  (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
     rtems_filesystem_freenode( &loc );
     rtems_set_errno_and_return_minus_one( ENOTDIR );

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/chmod.c:1.13 rtems/cpukit/libcsupport/src/chmod.c:1.14
--- rtems/cpukit/libcsupport/src/chmod.c:1.13   Thu Jun 11 20:53:32 2009
+++ rtems/cpukit/libcsupport/src/chmod.c        Thu Jul  1 10:12:36 2010
</font><font color='#997700'>@@ -38,16 +38,6 @@
</font>   if ( status != 0 )
     return -1;
 
<font color='#880000'>-  if ( !loc.handlers ){
-    rtems_filesystem_freenode( &loc );
-    rtems_set_errno_and_return_minus_one( EBADF );
-  }
-
-  if ( !loc.handlers->fchmod_h ){
-    rtems_filesystem_freenode( &loc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   result = (*loc.handlers->fchmod_h)( &loc, mode );
 
   rtems_filesystem_freenode( &loc );

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/chown.c:1.12 rtems/cpukit/libcsupport/src/chown.c:1.13
--- rtems/cpukit/libcsupport/src/chown.c:1.12   Thu Jun 11 20:53:32 2009
+++ rtems/cpukit/libcsupport/src/chown.c        Thu Jul  1 10:12:36 2010
</font><font color='#997700'>@@ -36,11 +36,6 @@
</font>   if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
     return -1;
 
<font color='#880000'>-  if ( !loc.ops->chown_h ) {
-    rtems_filesystem_freenode( &loc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   result = (*loc.ops->chown_h)( &loc, owner, group );
 
   rtems_filesystem_freenode( &loc );

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/close.c:1.12 rtems/cpukit/libcsupport/src/close.c:1.13
--- rtems/cpukit/libcsupport/src/close.c:1.12   Wed Sep 30 01:11:49 2009
+++ rtems/cpukit/libcsupport/src/close.c        Thu Jul  1 10:12:36 2010
</font><font color='#997700'>@@ -29,8 +29,7 @@
</font>   rtems_libio_check_is_open(iop);
 
   rc = RTEMS_SUCCESSFUL;
<font color='#880000'>-  if ( iop->handlers->close_h )
-    rc = (*iop->handlers->close_h)( iop );
</font><font color='#000088'>+  rc = (*iop->handlers->close_h)( iop );
</font> 
   rtems_filesystem_freenode( &iop->pathinfo );
   rtems_libio_free( iop );

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/eval.c:1.16 rtems/cpukit/libcsupport/src/eval.c:1.17
--- rtems/cpukit/libcsupport/src/eval.c:1.16    Thu May 27 11:29:37 2010
+++ rtems/cpukit/libcsupport/src/eval.c Thu Jul  1 10:12:36 2010
</font><font color='#997700'>@@ -42,9 +42,6 @@
</font>   if ( !pathloc )
     rtems_set_errno_and_return_minus_one( EIO );       /* should never happen */
 
<font color='#880000'>-  if ( !pathloc->ops->evalpath_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
 
   /*
<font color='#997700'>@@ -54,21 +51,11 @@
</font> 
   if ( (result == 0) && follow_link ) {
 
<font color='#880000'>-    if ( !pathloc->ops->node_type_h ){
-      rtems_filesystem_freenode( pathloc );
-      rtems_set_errno_and_return_minus_one( ENOTSUP );
-    }
-
</font>     type = (*pathloc->ops->node_type_h)( pathloc );
 
     if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
          ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
 
<font color='#880000'>-        if ( !pathloc->ops->eval_link_h ){
-          rtems_filesystem_freenode( pathloc );
-          rtems_set_errno_and_return_minus_one( ENOTSUP );
-        }
-
</font>         /* what to do with the valid node pathloc points to
          * if eval_link_h fails?
          * Let the FS implementation deal with this case.  It

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/fchdir.c:1.10 rtems/cpukit/libcsupport/src/fchdir.c:1.11
--- rtems/cpukit/libcsupport/src/fchdir.c:1.10  Mon Jun 28 17:14:35 2010
+++ rtems/cpukit/libcsupport/src/fchdir.c       Thu Jul  1 10:12:36 2010
</font><font color='#997700'>@@ -45,14 +45,6 @@
</font>    * Verify you can change directory into this node.
    */
 
<font color='#880000'>-  if ( !iop->pathinfo.ops ) {
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
-  if ( !iop->pathinfo.ops->node_type_h ) {
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   if (  (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
                                           RTEMS_FILESYSTEM_DIRECTORY ) {
     rtems_set_errno_and_return_minus_one( ENOTDIR );

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/fchmod.c:1.12 rtems/cpukit/libcsupport/src/fchmod.c:1.13
--- rtems/cpukit/libcsupport/src/fchmod.c:1.12  Sun Apr 18 01:05:34 2004
+++ rtems/cpukit/libcsupport/src/fchmod.c       Thu Jul  1 10:12:36 2010
</font><font color='#997700'>@@ -41,8 +41,5 @@
</font> 
   rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
 
<font color='#880000'>-  if ( !iop->handlers->fchmod_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
 }

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/fchown.c:1.1 rtems/cpukit/libcsupport/src/fchown.c:1.2
--- rtems/cpukit/libcsupport/src/fchown.c:1.1   Fri Apr 11 17:57:54 2008
+++ rtems/cpukit/libcsupport/src/fchown.c       Thu Jul  1 10:12:36 2010
</font><font color='#997700'>@@ -38,8 +38,5 @@
</font> 
   rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
 
<font color='#880000'>-  if ( !iop->pathinfo.ops->chown_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
 }

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/fcntl.c:1.25 rtems/cpukit/libcsupport/src/fcntl.c:1.26
--- rtems/cpukit/libcsupport/src/fcntl.c:1.25   Wed Sep 30 03:20:22 2009
+++ rtems/cpukit/libcsupport/src/fcntl.c        Thu Jul  1 10:12:36 2010
</font><font color='#997700'>@@ -140,12 +140,10 @@
</font>    */
 
   if (ret >= 0) {
<font color='#880000'>-    if (iop->handlers->fcntl_h) {
-      int err = (*iop->handlers->fcntl_h)( cmd, iop );
-      if (err) {
-        errno = err;
-        ret = -1;
-      }
</font><font color='#000088'>+    int err = (*iop->handlers->fcntl_h)( cmd, iop );
+    if (err) {
+      errno = err;
+      ret = -1;
</font>     }
   }
   return ret;

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/fdatasync.c:1.10 rtems/cpukit/libcsupport/src/fdatasync.c:1.11
--- rtems/cpukit/libcsupport/src/fdatasync.c:1.10       Thu Sep  4 13:54:13 2003
+++ rtems/cpukit/libcsupport/src/fdatasync.c    Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -35,8 +35,5 @@
</font>    *  Now process the fdatasync().
    */
 
<font color='#880000'>-  if ( !iop->handlers->fdatasync_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   return (*iop->handlers->fdatasync_h)( iop );
 }

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/freenode.c:1.1 rtems/cpukit/libcsupport/src/freenode.c:1.2
--- rtems/cpukit/libcsupport/src/freenode.c:1.1 Tue Jun 22 15:03:41 2010
+++ rtems/cpukit/libcsupport/src/freenode.c     Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -16,7 +16,5 @@
</font> 
 void rtems_filesystem_freenode( rtems_filesystem_location_info_t *_node )
 {
<font color='#880000'>-  if ( _node->ops )
-    if ( _node->ops->freenod_h )
-      _node->ops->freenod_h(_node );
</font><font color='#000088'>+  _node->ops->freenod_h(_node );
</font> }

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/fstat.c:1.11 rtems/cpukit/libcsupport/src/fstat.c:1.12
--- rtems/cpukit/libcsupport/src/fstat.c:1.11   Wed Sep 30 03:20:21 2009
+++ rtems/cpukit/libcsupport/src/fstat.c        Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -44,12 +44,6 @@
</font>   rtems_libio_check_fd( fd );
   rtems_libio_check_is_open(iop);
 
<font color='#880000'>-  if ( !iop->handlers )
-    rtems_set_errno_and_return_minus_one( EBADF );
-
-  if ( !iop->handlers->fstat_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   /*
    *  Zero out the stat structure so the various support
    *  versions of stat don't have to.

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/fsync.c:1.11 rtems/cpukit/libcsupport/src/fsync.c:1.12
--- rtems/cpukit/libcsupport/src/fsync.c:1.11   Thu Sep  4 13:54:13 2003
+++ rtems/cpukit/libcsupport/src/fsync.c        Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -35,11 +35,5 @@
</font>    *  Now process the fsync().
    */
 
<font color='#880000'>-  if ( !iop->handlers )
-    rtems_set_errno_and_return_minus_one( EBADF );
-
-  if ( !iop->handlers->fsync_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   return (*iop->handlers->fsync_h)( iop );
 }

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/ftruncate.c:1.12 rtems/cpukit/libcsupport/src/ftruncate.c:1.13
--- rtems/cpukit/libcsupport/src/ftruncate.c:1.12       Sun Apr 18 01:05:34 2004
+++ rtems/cpukit/libcsupport/src/ftruncate.c    Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -42,16 +42,10 @@
</font>    */
 
   loc = iop->pathinfo;
<font color='#880000'>-  if ( !loc.ops->node_type_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
     rtems_set_errno_and_return_minus_one( EISDIR );
 
   rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
 
<font color='#880000'>-  if ( !iop->handlers->ftruncate_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   return (*iop->handlers->ftruncate_h)( iop, length );
 }

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/ioctl.c:1.15 rtems/cpukit/libcsupport/src/ioctl.c:1.16
--- rtems/cpukit/libcsupport/src/ioctl.c:1.15   Wed Aug 30 20:10:00 2006
+++ rtems/cpukit/libcsupport/src/ioctl.c        Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -47,13 +47,6 @@
</font>   /*
    *  Now process the ioctl().
    */
<font color='#880000'>-
-  if ( !iop->handlers )
-    rtems_set_errno_and_return_minus_one( EBADF );
-
-  if ( !iop->handlers->ioctl_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
 
   return rc;

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/link.c:1.17 rtems/cpukit/libcsupport/src/link.c:1.18
--- rtems/cpukit/libcsupport/src/link.c:1.17    Tue Sep 15 04:29:55 2009
+++ rtems/cpukit/libcsupport/src/link.c Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -48,11 +48,6 @@
</font> 
   rtems_filesystem_get_start_loc( new, &i, &parent_loc );
 
<font color='#880000'>-  if ( !parent_loc.ops->evalformake_h ) {
-    rtems_filesystem_freenode( &existing_loc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
   if ( result != 0 ) {
     rtems_filesystem_freenode( &existing_loc );
<font color='#997700'>@@ -70,12 +65,6 @@
</font>     rtems_set_errno_and_return_minus_one( EXDEV );
   }
 
<font color='#880000'>-  if ( !parent_loc.ops->link_h ) {
-    rtems_filesystem_freenode( &existing_loc );
-    rtems_filesystem_freenode( &parent_loc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
 
   rtems_filesystem_freenode( &existing_loc );

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/lseek.c:1.16 rtems/cpukit/libcsupport/src/lseek.c:1.17
--- rtems/cpukit/libcsupport/src/lseek.c:1.16   Wed Sep 30 03:20:29 2009
+++ rtems/cpukit/libcsupport/src/lseek.c        Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -35,13 +35,6 @@
</font>   rtems_libio_check_is_open(iop);
 
   /*
<font color='#880000'>-   *  Check as many errors as possible before touching iop->offset.
-   */
-
-  if ( !iop->handlers->lseek_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
-  /*
</font>    *  Now process the lseek().
    */
 

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/mknod.c:1.14 rtems/cpukit/libcsupport/src/mknod.c:1.15
--- rtems/cpukit/libcsupport/src/mknod.c:1.14   Tue Oct 14 10:06:25 2008
+++ rtems/cpukit/libcsupport/src/mknod.c        Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -45,10 +45,6 @@
</font> 
   rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
 
<font color='#880000'>-  if ( !temp_loc.ops->evalformake_h ) {
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   result = (*temp_loc.ops->evalformake_h)(
     &pathname[i],
     &temp_loc,
<font color='#997700'>@@ -57,11 +53,6 @@
</font>   if ( result != 0 )
     return -1;
 
<font color='#880000'>-  if ( !temp_loc.ops->mknod_h ) {
-    rtems_filesystem_freenode( &temp_loc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   result =  (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
 
   rtems_filesystem_freenode( &temp_loc );

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/mount.c:1.38 rtems/cpukit/libcsupport/src/mount.c:1.39
--- rtems/cpukit/libcsupport/src/mount.c:1.38   Thu Jul  1 08:05:17 2010
+++ rtems/cpukit/libcsupport/src/mount.c        Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -176,15 +176,6 @@
</font>     loc_to_free = &loc;
 
     /*
<font color='#880000'>-     * Test for node_type_h
-     */
-
-    if (!loc.ops->node_type_h) {
-      errno =  ENOTSUP;
-      goto cleanup_and_bail;
-    }
-
-    /*
</font>      *  Test to see if it is a directory
      */
 
<font color='#997700'>@@ -220,11 +211,6 @@
</font>      *  below the base file system
      */
 
<font color='#880000'>-    if ( !loc.ops->mount_h ){
-      errno = ENOTSUP;
-      goto cleanup_and_bail;
-    }
-
</font>     if ( loc.ops->mount_h( mt_entry ) ) {
       goto cleanup_and_bail;
     }
<font color='#997700'>@@ -248,9 +234,7 @@
</font>     /*
      * Try to undo the mount operation
      */
<font color='#880000'>-    if ( loc.ops->unmount_h ) {
-      loc.ops->unmount_h( mt_entry );
-    }
</font><font color='#000088'>+    loc.ops->unmount_h( mt_entry );
</font>     goto cleanup_and_bail;
   }
 

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/open.c:1.24 rtems/cpukit/libcsupport/src/open.c:1.25
--- rtems/cpukit/libcsupport/src/open.c:1.24    Mon Feb 15 19:47:45 2010
+++ rtems/cpukit/libcsupport/src/open.c Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -158,11 +158,6 @@
</font>   iop->flags     |= rtems_libio_fcntl_flags( flags );
   iop->pathinfo   = loc;
 
<font color='#880000'>-  if ( !iop->handlers || !iop->handlers->open_h ) {
-    rc = ENOTSUP;
-    goto done;
-  }
-
</font>   rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
   if ( rc ) {
     rc = errno;

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/read.c:1.16 rtems/cpukit/libcsupport/src/read.c:1.17
--- rtems/cpukit/libcsupport/src/read.c:1.16    Thu Jun 24 16:48:52 2010
+++ rtems/cpukit/libcsupport/src/read.c Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -40,9 +40,6 @@
</font>   /*
    *  Now process the read().
    */
<font color='#880000'>-  if ( !iop->handlers->read_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   rc = (*iop->handlers->read_h)( iop, buffer, count );
 
   if ( rc > 0 )

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/readlink.c:1.13 rtems/cpukit/libcsupport/src/readlink.c:1.14
--- rtems/cpukit/libcsupport/src/readlink.c:1.13        Thu Jun 11 20:53:32 2009
+++ rtems/cpukit/libcsupport/src/readlink.c     Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -35,21 +35,11 @@
</font>   if ( result != 0 )
      return -1;
 
<font color='#880000'>-  if ( !loc.ops->node_type_h ){
-    rtems_filesystem_freenode( &loc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   if (  (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
     rtems_filesystem_freenode( &loc );
     rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
<font color='#880000'>-  if ( !loc.ops->readlink_h ){
-    rtems_filesystem_freenode( &loc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   result =  (*loc.ops->readlink_h)( &loc, buf, bufsize );
 
   rtems_filesystem_freenode( &loc );

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/readv.c:1.4 rtems/cpukit/libcsupport/src/readv.c:1.5
--- rtems/cpukit/libcsupport/src/readv.c:1.4    Sun Apr 25 14:50:05 2010
+++ rtems/cpukit/libcsupport/src/readv.c        Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -54,9 +54,6 @@
</font>   if ( iovcnt > IOV_MAX )
     rtems_set_errno_and_return_minus_one( EINVAL );
 
<font color='#880000'>-  if ( !iop->handlers->read_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   /*
    *  OpenGroup says that you are supposed to return EINVAL if the
    *  sum of the iov_len values in the iov array would overflow a

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/rmdir.c:1.17 rtems/cpukit/libcsupport/src/rmdir.c:1.18
--- rtems/cpukit/libcsupport/src/rmdir.c:1.17   Mon Feb 15 19:47:45 2010
+++ rtems/cpukit/libcsupport/src/rmdir.c        Thu Jul  1 10:12:37 2010
</font><font color='#997700'>@@ -74,14 +74,6 @@
</font>   /*
    * Verify you can remove this node as a directory.
    */
<font color='#880000'>-
-  if ( !loc.ops->node_type_h ){
-    rtems_filesystem_freenode( &loc );
-    if ( free_parentloc )
-      rtems_filesystem_freenode( &parentloc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   if (  (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
     rtems_filesystem_freenode( &loc );
     if ( free_parentloc )
<font color='#997700'>@@ -93,13 +85,6 @@
</font>    * Use the filesystems rmnod to remove the node.
    */
 
<font color='#880000'>-  if ( !loc.handlers->rmnod_h ){
-    rtems_filesystem_freenode( &loc );
-    if ( free_parentloc )
-      rtems_filesystem_freenode( &parentloc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   result =  (*loc.handlers->rmnod_h)( &parentloc, &loc );
 
   rtems_filesystem_freenode( &loc );

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/stat.c:1.16 rtems/cpukit/libcsupport/src/stat.c:1.17
--- rtems/cpukit/libcsupport/src/stat.c:1.16    Wed Oct 14 11:19:47 2009
+++ rtems/cpukit/libcsupport/src/stat.c Thu Jul  1 10:12:38 2010
</font><font color='#997700'>@@ -62,11 +62,6 @@
</font>   if ( status != 0 )
     return -1;
 
<font color='#880000'>-  if ( !loc.handlers->fstat_h ){
-    rtems_filesystem_freenode( &loc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   /*
    *  Zero out the stat structure so the various support
    *  versions of stat don't have to.

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/statvfs.c:1.3 rtems/cpukit/libcsupport/src/statvfs.c:1.4
--- rtems/cpukit/libcsupport/src/statvfs.c:1.3  Thu Jul  1 08:05:18 2010
+++ rtems/cpukit/libcsupport/src/statvfs.c      Thu Jul  1 10:12:38 2010
</font><font color='#997700'>@@ -42,9 +42,6 @@
</font>   mt_entry      = loc.mt_entry;
   fs_mount_root = &mt_entry->mt_fs_root;
 
<font color='#880000'>-  if ( !fs_mount_root->ops->statvfs_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   memset (sb, 0, sizeof (struct statvfs));
 
   result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/symlink.c:1.12 rtems/cpukit/libcsupport/src/symlink.c:1.13
--- rtems/cpukit/libcsupport/src/symlink.c:1.12 Mon Mar 30 12:05:23 2009
+++ rtems/cpukit/libcsupport/src/symlink.c      Thu Jul  1 10:12:38 2010
</font><font color='#997700'>@@ -30,19 +30,10 @@
</font> 
   rtems_filesystem_get_start_loc( sympath, &i, &loc );
 
<font color='#880000'>-  if ( !loc.ops->evalformake_h ) {
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
   if ( result != 0 )
     return -1;
 
<font color='#880000'>-  if ( !loc.ops->symlink_h ) {
-    rtems_filesystem_freenode( &loc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
 
   rtems_filesystem_freenode( &loc );

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/unlink.c:1.19 rtems/cpukit/libcsupport/src/unlink.c:1.20
--- rtems/cpukit/libcsupport/src/unlink.c:1.19  Mon Feb 15 19:47:46 2010
+++ rtems/cpukit/libcsupport/src/unlink.c       Thu Jul  1 10:12:38 2010
</font><font color='#997700'>@@ -67,13 +67,6 @@
</font>     return -1;
   }
 
<font color='#880000'>-  if ( !loc.ops->node_type_h ) {
-    rtems_filesystem_freenode( &loc );
-    if ( free_parentloc )
-      rtems_filesystem_freenode( &parentloc );
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-  }
-
</font>   if (  (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
     rtems_filesystem_freenode( &loc );
     if ( free_parentloc )

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/unmount.c:1.27 rtems/cpukit/libcsupport/src/unmount.c:1.28
--- rtems/cpukit/libcsupport/src/unmount.c:1.27 Thu Jul  1 08:05:18 2010
+++ rtems/cpukit/libcsupport/src/unmount.c      Thu Jul  1 10:12:38 2010
</font><font color='#997700'>@@ -88,17 +88,6 @@
</font>   rtems_filesystem_freenode( &loc );
 
   /*
<font color='#880000'>-   * Verify Unmount is supported by both filesystems.
-   */
-
-  if ( !fs_mount_loc->ops->unmount_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
-  if ( !fs_root_loc->ops->fsunmount_me_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
-
-  /*
</font>    *  Verify the current node is not in this filesystem.
    *  XXX - Joel I have a question here wasn't code added
    *        that made the current node thread based instead

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/write.c:1.17 rtems/cpukit/libcsupport/src/write.c:1.18
--- rtems/cpukit/libcsupport/src/write.c:1.17   Thu Jun 24 16:48:52 2010
+++ rtems/cpukit/libcsupport/src/write.c        Thu Jul  1 10:12:38 2010
</font><font color='#997700'>@@ -47,9 +47,6 @@
</font>   /*
    *  Now process the write() request.
    */
<font color='#880000'>-  if ( !iop->handlers->write_h )
-    rtems_set_errno_and_return_minus_one( ENOTSUP );
-
</font>   rc = (*iop->handlers->write_h)( iop, buffer, count );
 
   if ( rc > 0 )
</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>sh</strong></font>
 <font color='#225522'><em>(on branch rtems-4-10-branch)</em></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-07-01 Sebastian Huber <sebastian.huber@embedded-brains.de>

        * libcsupport/include/rtems/libio_.h: Removed
        rtems_filesystem_mount_table_control.
        * libcsupport/include/rtems/libio.h, libcsupport/src/mount-mgr.c,
        libcsupport/src/mount.c libcsupport/src/statvfs.c,
        libcsupport/src/unmount.c, libmisc/shell/main_mount.c: Documentation.
        Removed rtems_filesystem_mounts_first() and
        rtems_filesystem_mounts_next().  Added
        rtems_filesystem_mount_iterate().  Changed return type of
        rtems_filesystem_iterate().  Removed rtems_filesystem_nodes_equal().

2010-07-01      Sebastian Huber <sebastian.huber@embedded-brains.de>

        * libfs/src/nfsclient/src/nfs.c, libfs/src/nfsclient/src/nfs.c,
        libfs/src/nfsclient/src/librtemsNfs.h: Renamed
        rtems_nfsfs_initialize() in rtems_nfs_initialize().
        * sapi/include/confdefs.h: Reflect changes above.  Renamed
        *_miniIMFS in *_MINIIMFS.  Renamed *_NFSFS in *_NFS.
</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.2346.2.55&r2=text&tr2=1.2346.2.56&diff_format=h">M</a></td><td width='1%'>1.2346.2.56</td><td width='100%'>cpukit/ChangeLog</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.65.2.3&r2=text&tr2=1.65.2.4&diff_format=h">M</a></td><td width='1%'>1.65.2.4</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.34.2.1&r2=text&tr2=1.34.2.2&diff_format=h">M</a></td><td width='1%'>1.34.2.2</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/mount-mgr.c.diff?r1=text&tr1=1.2.2.1&r2=text&tr2=1.2.2.2&diff_format=h">M</a></td><td width='1%'>1.2.2.2</td><td width='100%'>cpukit/libcsupport/src/mount-mgr.c</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.33.2.3&r2=text&tr2=1.33.2.4&diff_format=h">M</a></td><td width='1%'>1.33.2.4</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/statvfs.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.2.2.1&diff_format=h">M</a></td><td width='1%'>1.2.2.1</td><td width='100%'>cpukit/libcsupport/src/statvfs.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.25.2.1&r2=text&tr2=1.25.2.2&diff_format=h">M</a></td><td width='1%'>1.25.2.2</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/nfsclient/src/librtemsNfs.h.diff?r1=text&tr1=1.5&r2=text&tr2=1.5.2.1&diff_format=h">M</a></td><td width='1%'>1.5.2.1</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.21&r2=text&tr2=1.21.2.1&diff_format=h">M</a></td><td width='1%'>1.21.2.1</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/libmisc/shell/main_mount.c.diff?r1=text&tr1=1.8.2.1&r2=text&tr2=1.8.2.2&diff_format=h">M</a></td><td width='1%'>1.8.2.2</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/sapi/include/confdefs.h.diff?r1=text&tr1=1.135.2.5&r2=text&tr2=1.135.2.6&diff_format=h">M</a></td><td width='1%'>1.135.2.6</td><td width='100%'>cpukit/sapi/include/confdefs.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2346.2.55 rtems/cpukit/ChangeLog:1.2346.2.56
--- rtems/cpukit/ChangeLog:1.2346.2.55  Thu Jul  1 10:01:11 2010
+++ rtems/cpukit/ChangeLog      Thu Jul  1 10:18:05 2010
</font><font color='#997700'>@@ -1,3 +1,23 @@
</font><font color='#000088'>+2010-07-01    Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+       * libcsupport/include/rtems/libio_.h: Removed
+       rtems_filesystem_mount_table_control.
+       * libcsupport/include/rtems/libio.h, libcsupport/src/mount-mgr.c,
+       libcsupport/src/mount.c libcsupport/src/statvfs.c,
+       libcsupport/src/unmount.c, libmisc/shell/main_mount.c: Documentation.
+       Removed rtems_filesystem_mounts_first() and
+       rtems_filesystem_mounts_next().  Added
+       rtems_filesystem_mount_iterate().  Changed return type of
+       rtems_filesystem_iterate().  Removed rtems_filesystem_nodes_equal().
+
+2010-07-01     Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+       * libfs/src/nfsclient/src/nfs.c, libfs/src/nfsclient/src/nfs.c,
+       libfs/src/nfsclient/src/librtemsNfs.h: Renamed
+       rtems_nfsfs_initialize() in rtems_nfs_initialize().
+       * sapi/include/confdefs.h: Reflect changes above.  Renamed
+       *_miniIMFS in *_MINIIMFS.  Renamed *_NFSFS in *_NFS.
+
</font> 2010-06-29        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
        * libnetworking/lib/tftpDriver.c: rtems_tftp_ops and

<font color='#006600'>diff -u rtems/cpukit/libcsupport/include/rtems/libio.h:1.65.2.3 rtems/cpukit/libcsupport/include/rtems/libio.h:1.65.2.4
--- rtems/cpukit/libcsupport/include/rtems/libio.h:1.65.2.3     Thu Jul  1 09:39:32 2010
+++ rtems/cpukit/libcsupport/include/rtems/libio.h      Thu Jul  1 10:18:06 2010
</font><font color='#997700'>@@ -314,46 +314,6 @@
</font> };
 
 /**
<font color='#880000'>- * @brief File system table entry.
- */
-typedef struct rtems_filesystem_table_t {
-  const char                    *type;
-  rtems_filesystem_fsmount_me_t  mount_h;
-} rtems_filesystem_table_t;
-
-/**
- * @brief Static table of file systems.
- *
- * Externally defined by confdefs.h or the user.
- */
-extern const rtems_filesystem_table_t rtems_filesystem_table [];
-
-/**
- * @brief Per file system table entry routine type.
- *
- * @see rtems_filesystem_iterate().
- *
- * @retval true Continue the iteration.
- * @retval false Stop the iteration.
- */
-typedef bool (*rtems_per_filesystem_routine)(
-  const rtems_filesystem_table_t *entry,
-  void *arg
-);
-
-/**
- * @brief Iterates over the file system table.
- *
- * For each file system table entry the @a routine will be called with the
- * table entry and the @a routine_arg parameter.
- */
-void
-rtems_filesystem_iterate(
-  rtems_per_filesystem_routine routine,
-  void *routine_arg
-);
-
-/**
</font>  * @brief Gets the mount handler for the file system @a type.
  *
  * @return The file system mount handler associated with the @a type, or
<font color='#997700'>@@ -364,35 +324,6 @@
</font>   const char *type
 );
 
<font color='#880000'>-/*
- * 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> /**
  * @brief Contain file system specific information which is required to support
  * fpathconf().
<font color='#997700'>@@ -420,67 +351,6 @@
</font> extern const rtems_filesystem_limits_and_options_t rtems_filesystem_default_pathconf;
 
 /**
<font color='#880000'>- * @brief Mount table entry.
- */
-struct rtems_filesystem_mount_table_entry_tt {
-  rtems_chain_node                       Node;
-  rtems_filesystem_location_info_t       mt_point_node;
-  rtems_filesystem_location_info_t       mt_fs_root;
-  int                                    options;
-  void                                  *fs_info;
-
-  rtems_filesystem_limits_and_options_t  pathconf_limits_and_options;
-
-  /*
-   * 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;
-
-  /*
-   *  When someone adds a mounted filesystem on a real device,
-   *  this will need to be used.
-   *
-   *  The lower layers can manage how this is managed. Leave as a
-   *  string.
-   */
-  char                                  *dev;
-};
-
-/**
- * @brief The pathconf setting for a file system.
- */
-#define rtems_filesystem_pathconf(_mte) ((_mte)->pathconf_limits_and_options)
-
-/**
- * @brief The type of file system. Its name.
- */
-#define rtems_filesystem_type(_mte) ((_mte)->type)
-
-/**
- * @brief The mount point of a file system.
- */
-#define rtems_filesystem_mount_point(_mte) ((_mte)->target)
-
-/**
- * @brief The device entry of a file system.
- */
-#define rtems_filesystem_mount_device(_mte) ((_mte)->dev)
-
-/**
- * @brief File systems options.
- */
-typedef enum {
-  RTEMS_FILESYSTEM_READ_ONLY,
-  RTEMS_FILESYSTEM_READ_WRITE,
-  RTEMS_FILESYSTEM_BAD_OPTIONS
-} rtems_filesystem_options_t;
-
-/**
</font>  * @brief An open file data structure.
  *
  * It will be indexed by 'fd'.
<font color='#997700'>@@ -669,6 +539,46 @@
</font> #define rtems_libio_is_valid_perms( _perm )     \
  (~ ((~RTEMS_LIBIO_PERMS_RWX) & _perm ))
 
<font color='#000088'>+/*
+ *  Prototypes for filesystem
+ */
+
+void rtems_filesystem_initialize( void );
+
+typedef void (*rtems_libio_init_functions_t)(void);
+extern  rtems_libio_init_functions_t rtems_libio_init_helper;
+
+void    open_dev_console(void);
+
+typedef void (*rtems_libio_supp_functions_t)(void);
+extern  rtems_libio_supp_functions_t rtems_libio_supp_helper;
+
+typedef void (*rtems_fs_init_functions_t)(void);
+extern  rtems_fs_init_functions_t    rtems_fs_init_helper;
+
+/**
+ * @brief Creates a directory and all its parent directories according to
+ * @a path.
+ *
+ * The @a mode value selects the access permissions of the directory.
+ *
+ * @retval 0 Successful operation.
+ * @retval -1 An error occured.  The @c errno indicates the error.
+ */
+extern int rtems_mkdir(const char *path, mode_t mode);
+
+/** @} */
+
+/**
+ * @defgroup FileSystemTypesAndMount File System Types and Mount
+ *
+ * @ingroup LibIO
+ *
+ * @brief File system types and mount.
+ *
+ * @{
+ */
+
</font> /**
  * @name File System Types
  *
<font color='#997700'>@@ -686,16 +596,132 @@
</font> 
 /** @} */
 
<font color='#880000'>-/*
- *  Prototypes for filesystem
</font><font color='#000088'>+/**
+ * @brief Mount table entry.
</font>  */
<font color='#000088'>+struct rtems_filesystem_mount_table_entry_tt {
+  rtems_chain_node                       Node;
+  rtems_filesystem_location_info_t       mt_point_node;
+  rtems_filesystem_location_info_t       mt_fs_root;
+  int                                    options;
+  void                                  *fs_info;
</font> 
<font color='#880000'>-void rtems_filesystem_initialize( void );
</font><font color='#000088'>+  rtems_filesystem_limits_and_options_t  pathconf_limits_and_options;
+
+  /*
+   * 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;
+
+  /*
+   *  When someone adds a mounted filesystem on a real device,
+   *  this will need to be used.
+   *
+   *  The lower layers can manage how this is managed. Leave as a
+   *  string.
+   */
+  char                                  *dev;
+};
</font> 
<font color='#000088'>+/**
+ * @brief File system options.
+ */
+typedef enum {
+  RTEMS_FILESYSTEM_READ_ONLY,
+  RTEMS_FILESYSTEM_READ_WRITE,
+  RTEMS_FILESYSTEM_BAD_OPTIONS
+} rtems_filesystem_options_t;
+
+/**
+ * @brief File system table entry.
+ */
+typedef struct rtems_filesystem_table_t {
+  const char                    *type;
+  rtems_filesystem_fsmount_me_t  mount_h;
+} rtems_filesystem_table_t;
+
+/**
+ * @brief Static table of file systems.
+ *
+ * Externally defined by confdefs.h or the user.
+ */
+extern const rtems_filesystem_table_t rtems_filesystem_table [];
+
+/**
+ * @brief Registers a file system @a type.
+ *
+ * The @a mount_h handler will be used to mount a file system of this @a type.
+ *
+ * @retval 0 Successful operation.
+ * @retval -1 An error occured.  The @c errno indicates the error.
+ */
+int rtems_filesystem_register(
+  const char                    *type,
+  rtems_filesystem_fsmount_me_t  mount_h
+);
+
+/**
+ * @brief Unregisters a file system @a type.
+ *
+ * @retval 0 Successful operation.
+ * @retval -1 An error occured.  The @c errno indicates the error.
+ */
+int rtems_filesystem_unregister(
+  const char *type
+);
+
+/**
+ * @brief Unmounts the file system at @a mount_path.
+ *
+ * @todo Due to file system implementation shortcomings it is possible to
+ * unmount file systems in use.  This likely leads to heap corruption.  Unmount
+ * only file systems which are not in use by the application.
+ *
+ * @retval 0 Successful operation.
+ * @retval -1 An error occured.  The @c errno indicates the error.
+ */
</font> int unmount(
   const char *mount_path
 );
 
<font color='#000088'>+/**
+ * @brief Mounts a file system at @a target.
+ *
+ * The @a source may be a path to the corresponding device file, or @c NULL.
+ * The @a target path must lead to an existing directory, or @c NULL.  In case
+ * @a target is @c NULL, the root file system will be mounted.  The @a data
+ * parameter will be forwarded to the file system initialization handler.  The
+ * file system type is selected by @a filesystemtype and may be one of
+ * - RTEMS_FILESYSTEM_TYPE_DEVFS,
+ * - RTEMS_FILESYSTEM_TYPE_DOSFS,
+ * - RTEMS_FILESYSTEM_TYPE_FTPFS,
+ * - RTEMS_FILESYSTEM_TYPE_IMFS,
+ * - RTEMS_FILESYSTEM_TYPE_MINIIMFS,
+ * - RTEMS_FILESYSTEM_TYPE_NFS,
+ * - RTEMS_FILESYSTEM_TYPE_RFS, or
+ * - RTEMS_FILESYSTEM_TYPE_TFTPFS.
+ *
+ * Only configured or registered file system types are available.  You can add
+ * file system types to your application configuration with
+ * - CONFIGURE_FILESYSTEM_DEVFS,
+ * - CONFIGURE_FILESYSTEM_DOSFS,
+ * - CONFIGURE_FILESYSTEM_FTPFS,
+ * - CONFIGURE_FILESYSTEM_IMFS,
+ * - CONFIGURE_FILESYSTEM_MINIIMFS,
+ * - CONFIGURE_FILESYSTEM_NFS,
+ * - CONFIGURE_FILESYSTEM_RFS, and
+ * - CONFIGURE_FILESYSTEM_TFTPFS.
+ *
+ * @see rtems_filesystem_register() and mount_and_make_target_path().
+ *
+ * @retval 0 Successful operation.
+ * @retval -1 An error occured.  The @c errno indicates the error.
+ */
</font> int mount(
   const char                 *source,
   const char                 *target,
<font color='#997700'>@@ -723,10 +749,72 @@
</font>   const void                 *data
 );
 
<font color='#880000'>-/*
- *  Boot Time Mount Table Structure
</font><font color='#000088'>+/**
+ * @brief Per file system type routine.
+ *
+ * @see rtems_filesystem_iterate().
+ *
+ * @retval true Stop the iteration.
+ * @retval false Continue the iteration.
+ */
+typedef bool (*rtems_per_filesystem_routine)(
+  const rtems_filesystem_table_t *fs_entry,
+  void *arg
+);
+
+/**
+ * @brief Iterates over all file system types.
+ *
+ * For each file system type the @a routine will be called with the entry and
+ * the @a routine_arg parameter.
+ *
+ * Do not register or unregister file system types in @a routine.
+ *
+ * The iteration is protected by the IO library mutex.
+ *
+ * @retval true Iteration stopped due to @a routine return status.
+ * @retval false Iteration through all entries.
+ */
+bool rtems_filesystem_iterate(
+  rtems_per_filesystem_routine routine,
+  void *routine_arg
+);
+
+/**
+ * @brief Per file system mount routine.
+ *
+ * @see rtems_filesystem_mount_iterate().
+ *
+ * @retval true Stop the iteration.
+ * @retval false Continue the iteration.
+ */
+typedef bool (*rtems_per_filesystem_mount_routine)(
+  const rtems_filesystem_mount_table_entry_t *mt_entry,
+  void *arg
+);
+
+/**
+ * @brief Iterates over all file system mounts.
+ *
+ * For each file system mount the @a routine will be called with the entry and
+ * the @a routine_arg parameter.
+ *
+ * Do not mount or unmount file systems in @a routine.
+ *
+ * The iteration is protected by the IO library mutex.
+ *
+ * @retval true Iteration stopped due to @a routine return status.
+ * @retval false Iteration through all entries.
</font>  */
<font color='#000088'>+bool
+rtems_filesystem_mount_iterate(
+  rtems_per_filesystem_mount_routine routine,
+  void *routine_arg
+);
</font> 
<font color='#000088'>+/**
+ * @brief Boot time mount table entry.
+ */
</font> typedef struct {
   const char                              *type;
   rtems_filesystem_options_t               fsoptions;
<font color='#997700'>@@ -737,17 +825,6 @@
</font> extern const rtems_filesystem_mount_table_t *rtems_filesystem_mount_table;
 extern const int                             rtems_filesystem_mount_table_size;
 
<font color='#880000'>-typedef void (*rtems_libio_init_functions_t)(void);
-extern  rtems_libio_init_functions_t rtems_libio_init_helper;
-
-void    open_dev_console(void);
-
-typedef void (*rtems_libio_supp_functions_t)(void);
-extern  rtems_libio_supp_functions_t rtems_libio_supp_helper;
-
-typedef void (*rtems_fs_init_functions_t)(void);
-extern  rtems_fs_init_functions_t    rtems_fs_init_helper;
-
</font> /**
  * @brief Creates a directory and all its parrent directories according to
  * @a path.
<font color='#997700'>@@ -831,6 +908,26 @@
</font> 
 /** @} */
 
<font color='#000088'>+/**
+ * @brief The pathconf setting for a file system.
+ */
+#define rtems_filesystem_pathconf(_mte) ((_mte)->pathconf_limits_and_options)
+
+/**
+ * @brief The type of file system. Its name.
+ */
+#define rtems_filesystem_type(_mte) ((_mte)->type)
+
+/**
+ * @brief The mount point of a file system.
+ */
+#define rtems_filesystem_mount_point(_mte) ((_mte)->target)
+
+/**
+ * @brief The device entry of a file system.
+ */
+#define rtems_filesystem_mount_device(_mte) ((_mte)->dev)
+
</font> #ifdef __cplusplus
 }
 #endif

<font color='#006600'>diff -u rtems/cpukit/libcsupport/include/rtems/libio_.h:1.34.2.1 rtems/cpukit/libcsupport/include/rtems/libio_.h:1.34.2.2
--- rtems/cpukit/libcsupport/include/rtems/libio_.h:1.34.2.1    Thu Jul  1 09:10:51 2010
+++ rtems/cpukit/libcsupport/include/rtems/libio_.h     Thu Jul  1 10:18:06 2010
</font><font color='#997700'>@@ -40,11 +40,6 @@
</font> extern const rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers;
 
 /*
<font color='#880000'>- * Mount table list.
- */
-extern rtems_chain_control rtems_filesystem_mount_table_control;
-
-/*
</font>  *  File descriptor Table Information
  */
 

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/mount-mgr.c:1.2.2.1 rtems/cpukit/libcsupport/src/mount-mgr.c:1.2.2.2
--- rtems/cpukit/libcsupport/src/mount-mgr.c:1.2.2.1    Thu Jul  1 09:10:51 2010
+++ rtems/cpukit/libcsupport/src/mount-mgr.c    Thu Jul  1 10:18:06 2010
</font><font color='#997700'>@@ -37,38 +37,37 @@
</font>   rtems_filesystem_table_t entry;
 } filesystem_node;
 
<font color='#880000'>-RTEMS_CHAIN_DEFINE_EMPTY(filesystem_chain);
</font><font color='#000088'>+static RTEMS_CHAIN_DEFINE_EMPTY(filesystem_chain);
</font> 
<font color='#880000'>-void
-rtems_filesystem_iterate(
</font><font color='#000088'>+bool rtems_filesystem_iterate(
</font>   rtems_per_filesystem_routine routine,
   void *routine_arg
 )
 {
   const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
   rtems_chain_node *node = NULL;
<font color='#000088'>+  bool stop = false;
</font> 
<font color='#880000'>-  while ( table_entry->type ) {
-    if ( !(*routine)( table_entry, routine_arg ) ) {
-      break;
-    }
-
</font><font color='#000088'>+  while ( table_entry->type && !stop ) {
+    stop = (*routine)( table_entry, routine_arg );
</font>     ++table_entry;
   }
 
<font color='#880000'>-  rtems_libio_lock();
-  for (
-    node = rtems_chain_first( &filesystem_chain );
-    !rtems_chain_is_tail( &filesystem_chain, node );
-    node = rtems_chain_next( node )
-  ) {
-    const filesystem_node *fsn = (filesystem_node *) node;
</font><font color='#000088'>+  if ( !stop ) {
+    rtems_libio_lock();
+    for (
+      node = rtems_chain_first( &filesystem_chain );
+      !rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
+      node = rtems_chain_next( node )
+    ) {
+      const filesystem_node *fsn = (filesystem_node *) node;
</font> 
<font color='#880000'>-    if ( !(*routine)( &fsn->entry, routine_arg ) ) {
-      break;
</font><font color='#000088'>+      stop = (*routine)( &fsn->entry, routine_arg );
</font>     }
<font color='#000088'>+    rtems_libio_unlock();
</font>   }
<font color='#880000'>-  rtems_libio_unlock();
</font><font color='#000088'>+
+  return stop;
</font> }
 
 typedef struct {
<font color='#997700'>@@ -81,7 +80,7 @@
</font>   find_arg *fa = arg;
 
   if ( strcmp( entry->type, fa->type ) != 0 ) {
<font color='#880000'>-    return true;
</font><font color='#000088'>+    return false;
</font>   } else {
     fa->mount_h = entry->mount_h;
 

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/mount.c:1.33.2.3 rtems/cpukit/libcsupport/src/mount.c:1.33.2.4
--- rtems/cpukit/libcsupport/src/mount.c:1.33.2.3       Thu Jul  1 09:57:08 2010
+++ rtems/cpukit/libcsupport/src/mount.c        Thu Jul  1 10:18:06 2010
</font><font color='#997700'>@@ -36,10 +36,7 @@
</font> 
 #include <rtems/libio_.h>
 
<font color='#880000'>-/*
- * Mount table list.
- */
-RTEMS_CHAIN_DEFINE_EMPTY(rtems_filesystem_mount_table_control);
</font><font color='#000088'>+static RTEMS_CHAIN_DEFINE_EMPTY(mount_chain);
</font> 
 /*
  * Default pathconfs.
<font color='#997700'>@@ -59,37 +56,12 @@
</font>    0     /* posix_vdisable: special char processing, 0=no, 1=yes */
 };
 
<font color='#880000'>-/*
- *  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
</font><font color='#000088'>+static bool is_node_fs_root(
+  const rtems_filesystem_mount_table_entry_t *mt_entry,
+  void *arg
</font> )
 {
<font color='#880000'>-  rtems_chain_node *node = NULL;
-
-  /*
-   * For each mount table entry
-   */
-  for ( node = rtems_chain_first( &rtems_filesystem_mount_table_control );
-        !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, node );
-        node = rtems_chain_next( node ) ) {
-    rtems_filesystem_mount_table_entry_t *mount_table_entry =
-      (rtems_filesystem_mount_table_entry_t *) node;
-
-    if ( mount_table_entry->mt_fs_root.node_access == loc->node_access )
-      return true;
-  }
-
-  return false;
</font><font color='#000088'>+  return arg == mt_entry->mt_fs_root.node_access;
</font> }
 
 static rtems_filesystem_mount_table_entry_t *alloc_mount_table_entry(
<font color='#997700'>@@ -225,7 +197,7 @@
</font>      *  You can only mount one file system onto a single mount point.
      */
 
<font color='#880000'>-    if ( Is_node_fs_root(  &loc ) ){
</font><font color='#000088'>+    if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
</font>       errno = EBUSY;
       goto cleanup_and_bail;
     }
<font color='#997700'>@@ -260,7 +232,7 @@
</font>     /*
      * Do we already have a base file system ?
      */
<font color='#880000'>-    if ( !rtems_chain_is_empty( &rtems_filesystem_mount_table_control ) ) {
</font><font color='#000088'>+    if ( !rtems_chain_is_empty( &mount_chain ) ) {
</font>       errno = EINVAL;
       goto cleanup_and_bail;
     }
<font color='#997700'>@@ -285,8 +257,9 @@
</font>   /*
    *  Add the mount table entry to the mount table chain
    */
<font color='#880000'>-  rtems_chain_append( &rtems_filesystem_mount_table_control,
-                      &mt_entry->Node );
</font><font color='#000088'>+  rtems_libio_lock();
+  rtems_chain_append( &mount_chain, &mt_entry->Node );
+  rtems_libio_unlock();
</font> 
   if ( !has_target )
     rtems_filesystem_root = mt_entry->mt_fs_root;
<font color='#997700'>@@ -303,33 +276,26 @@
</font>   return -1;
 }
 
<font color='#880000'>-/*
- * Get the first entry in the mount table.
- */
-rtems_filesystem_mount_table_entry_t *
-rtems_filesystem_mounts_first(
-  void
</font><font color='#000088'>+bool rtems_filesystem_mount_iterate(
+  rtems_per_filesystem_mount_routine routine,
+  void *routine_arg
</font> )
 {
<font color='#880000'>-  rtems_filesystem_mount_table_entry_t *entry = NULL;
</font><font color='#000088'>+  rtems_chain_node *node = NULL;
+  bool stop = false;
</font> 
<font color='#880000'>-  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 );
</font><font color='#000088'>+  rtems_libio_lock();
+  for (
+    node = rtems_chain_first( &mount_chain );
+    !rtems_chain_is_tail( &mount_chain, node ) && !stop;
+    node = rtems_chain_next( node )
+  ) {
+    const rtems_filesystem_mount_table_entry_t *mt_entry =
+      (rtems_filesystem_mount_table_entry_t *) node;
</font> 
<font color='#880000'>-  return entry;
-}
</font><font color='#000088'>+    stop = (*routine)( mt_entry, routine_arg );
+  }
+  rtems_libio_unlock();
</font> 
<font color='#880000'>-/*
- * 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 ( !entry )
-    return NULL;
-  return (rtems_filesystem_mount_table_entry_t *)
-    rtems_chain_next( &entry->Node );
</font><font color='#000088'>+  return stop;
</font> }

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/statvfs.c:1.2 rtems/cpukit/libcsupport/src/statvfs.c:1.2.2.1
--- rtems/cpukit/libcsupport/src/statvfs.c:1.2  Sun Nov 29 07:35:32 2009
+++ rtems/cpukit/libcsupport/src/statvfs.c      Thu Jul  1 10:18:06 2010
</font><font color='#997700'>@@ -21,11 +21,6 @@
</font> 
 #include <sys/statvfs.h>
 
<font color='#880000'>-/*
- *  Data structures and routines private to mount/unmount pair.
- */
-extern rtems_chain_control rtems_filesystem_mount_table_control;
-
</font> int
 statvfs (const char *path, struct statvfs *sb)
 {

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/unmount.c:1.25.2.1 rtems/cpukit/libcsupport/src/unmount.c:1.25.2.2
--- rtems/cpukit/libcsupport/src/unmount.c:1.25.2.1     Thu Jul  1 09:39:34 2010
+++ rtems/cpukit/libcsupport/src/unmount.c      Thu Jul  1 10:18:06 2010
</font><font color='#997700'>@@ -22,7 +22,6 @@
</font> 
 #include <sys/types.h>
 #include <sys/stat.h>
<font color='#880000'>-#include <rtems/chain.h>
</font> #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
<font color='#997700'>@@ -32,51 +31,14 @@
</font> 
 #include <rtems/libio_.h>
 #include <rtems/seterr.h>
<font color='#000088'>+#include <rtems/chain.h>
</font> 
<font color='#880000'>-bool rtems_filesystem_nodes_equal(
-  const rtems_filesystem_location_info_t   *loc1,
-  const rtems_filesystem_location_info_t   *loc2
-){
-  return ( loc1->node_access == loc2->node_access );
-}
-
-
-/*
- *  file_systems_below_this_mountpoint
- *
- *  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 mt_fs_root to the new_fs_root_node. If any of the
- *  mount table file system root nodes matches the new file system root node
- *  this indicates that we are trying to mount a file system that has already
- *  been mounted. This is not a permitted operation. temp_loc is set to
- *  the root node of the file system being unmounted.
- */
-
-bool file_systems_below_this_mountpoint(
-  const char                            *path __attribute__((unused)),
-  rtems_filesystem_location_info_t      *fs_root_loc,
-  rtems_filesystem_mount_table_entry_t  *fs_to_unmount __attribute__((unused))
</font><font color='#000088'>+static bool is_fs_below_mount_point(
+  const rtems_filesystem_mount_table_entry_t *mt_entry,
+  void *arg
</font> )
 {
<font color='#880000'>-  rtems_chain_node                     *the_node;
-  rtems_filesystem_mount_table_entry_t *the_mount_entry;
-
-  /*
-   * Search the mount table for any mount entries referencing this
-   * mount 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_point_node.mt_entry  == fs_root_loc->mt_entry ) {
-        return true;
-     }
-  }
-
-  return false;
</font><font color='#000088'>+  return arg == mt_entry->mt_point_node.mt_entry;
</font> }
 
 /*
<font color='#997700'>@@ -114,7 +76,7 @@
</font>    * Verify this is the root node for the file system to be unmounted.
    */
 
<font color='#880000'>-  if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){
</font><font color='#000088'>+  if ( fs_root_loc->node_access != loc.node_access ){
</font>     rtems_filesystem_freenode( &loc );
     rtems_set_errno_and_return_minus_one( EACCES );
   }
<font color='#997700'>@@ -151,7 +113,8 @@
</font>    *  Verify there are no file systems below the path specified
    */
 
<font color='#880000'>-  if ( file_systems_below_this_mountpoint( path, fs_root_loc, mt_entry ) != 0 )
</font><font color='#000088'>+  if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
+                                       fs_root_loc->mt_entry ) )
</font>     rtems_set_errno_and_return_minus_one( EBUSY );
 
   /*
<font color='#997700'>@@ -195,7 +158,9 @@
</font>    *  Extract the mount table entry from the chain
    */
 
<font color='#880000'>-  rtems_chain_extract( ( rtems_chain_node * ) mt_entry );
</font><font color='#000088'>+  rtems_libio_lock();
+  rtems_chain_extract( &mt_entry->Node );
+  rtems_libio_unlock();
</font> 
   /*
    *  Free the memory node that was allocated in mount

<font color='#006600'>diff -u rtems/cpukit/libfs/src/nfsclient/src/librtemsNfs.h:1.5 rtems/cpukit/libfs/src/nfsclient/src/librtemsNfs.h:1.5.2.1
--- rtems/cpukit/libfs/src/nfsclient/src/librtemsNfs.h:1.5      Mon May 31 08:56:36 2010
+++ rtems/cpukit/libfs/src/nfsclient/src/librtemsNfs.h  Thu Jul  1 10:18:06 2010
</font><font color='#997700'>@@ -143,8 +143,8 @@
</font>  * Filesystem mount table mount handler. Do not call, use the mount call.
  */
 int<span style="background-color: #FF0000"> </span>
<font color='#880000'>-rtems_nfsfs_initialize(rtems_filesystem_mount_table_entry_t *mt_entry,
-                       const void                           *data);
</font><font color='#000088'>+rtems_nfs_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='#006600'>diff -u rtems/cpukit/libfs/src/nfsclient/src/nfs.c:1.21 rtems/cpukit/libfs/src/nfsclient/src/nfs.c:1.21.2.1
--- rtems/cpukit/libfs/src/nfsclient/src/nfs.c:1.21     Mon May 31 08:56:37 2010
+++ rtems/cpukit/libfs/src/nfsclient/src/nfs.c  Thu Jul  1 10:18:06 2010
</font><font color='#997700'>@@ -1908,8 +1908,8 @@
</font> #endif
 
 
<font color='#880000'>-int rtems_nfsfs_initialize(
-       rtems_filesystem_mount_table_entry_t *mt_entry,
</font><font color='#000088'>+int rtems_nfs_initialize(
+  rtems_filesystem_mount_table_entry_t *mt_entry,
</font>   const void                           *data
 )
 {
<font color='#997700'>@@ -2479,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'>-           rtems_nfsfs_initialize,         /* OPTIONAL; may be NULL -- not used anymore */
</font><font color='#000088'>+              rtems_nfs_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='#006600'>diff -u rtems/cpukit/libmisc/shell/main_mount.c:1.8.2.1 rtems/cpukit/libmisc/shell/main_mount.c:1.8.2.2
--- rtems/cpukit/libmisc/shell/main_mount.c:1.8.2.1     Thu Jul  1 09:10:53 2010
+++ rtems/cpukit/libmisc/shell/main_mount.c     Thu Jul  1 10:18:06 2010
</font><font color='#997700'>@@ -31,7 +31,7 @@
</font> {
   printf("%s ", entry->type);
 
<font color='#880000'>-  return true;
</font><font color='#000088'>+  return false;
</font> }
 
 int rtems_shell_main_mount(

<font color='#006600'>diff -u rtems/cpukit/sapi/include/confdefs.h:1.135.2.5 rtems/cpukit/sapi/include/confdefs.h:1.135.2.6
--- rtems/cpukit/sapi/include/confdefs.h:1.135.2.5      Thu Jul  1 09:51:25 2010
+++ rtems/cpukit/sapi/include/confdefs.h        Thu Jul  1 10:18:06 2010
</font><font color='#997700'>@@ -188,12 +188,12 @@
</font>  *     Add file filesystems to the default filesystem table.
  *
  *   List of available file systems. You can define as many as you like:
<font color='#880000'>- *     CONFIGURE_FILESYSTEM_miniIMFS - MiniIMFS, use DEVFS now
</font><font color='#000088'>+ *     CONFIGURE_FILESYSTEM_MINIIMFS - MiniIMFS, use DEVFS now
</font>  *     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
<font color='#880000'>- *     CONFIGURE_FILESYSTEM_NFSFS    - Network File System, networking enabled
</font><font color='#000088'>+ *     CONFIGURE_FILESYSTEM_NFS      - Network File System, networking enabled
</font>  *     CONFIGURE_FILESYSTEM_DOSFS    - DOS File System, uses libblock
  *     CONFIGURE_FILESYSTEM_RFS      - RTEMS File System (RFS), uses libblock
  *
<font color='#997700'>@@ -215,12 +215,12 @@
</font>    * been disabled.
    */
   #ifdef CONFIGURE_FILESYSTEM_ALL
<font color='#880000'>-    #define CONFIGURE_FILESYSTEM_miniIMFS
</font><font color='#000088'>+    #define CONFIGURE_FILESYSTEM_MINIIMFS
</font>     #define CONFIGURE_FILESYSTEM_IMFS
     #define CONFIGURE_FILESYSTEM_DEVFS
     #define CONFIGURE_FILESYSTEM_TFTPFS
     #define CONFIGURE_FILESYSTEM_FTPFS
<font color='#880000'>-    #define CONFIGURE_FILESYSTEM_NFSFS
</font><font color='#000088'>+    #define CONFIGURE_FILESYSTEM_NFS
</font>     #define CONFIGURE_FILESYSTEM_DOSFS
     #define CONFIGURE_FILESYSTEM_RFS
   #endif
<font color='#997700'>@@ -239,12 +239,12 @@
</font>     #elif defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
       #undef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
     #endif
<font color='#880000'>-    #undef CONFIGURE_FILESYSTEM_miniIMFS
</font><font color='#000088'>+    #undef CONFIGURE_FILESYSTEM_MINIIMFS
</font>     #undef CONFIGURE_FILESYSTEM_IMFS
     #undef CONFIGURE_FILESYSTEM_DEVFS
     #undef CONFIGURE_FILESYSTEM_TFTPFS
     #undef CONFIGURE_FILESYSTEM_FTPFS
<font color='#880000'>-    #undef CONFIGURE_FILESYSTEM_NFSFS
</font><font color='#000088'>+    #undef CONFIGURE_FILESYSTEM_NFS
</font>     #undef CONFIGURE_FILESYSTEM_DOSFS
     #undef CONFIGURE_FILESYSTEM_RFS
   #endif
<font color='#997700'>@@ -257,7 +257,7 @@
</font>     #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
       #define CONFIGURE_FILESYSTEM_DEVFS
     #elif defined(CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM)
<font color='#880000'>-      #define CONFIGURE_FILESYSTEM_miniIMFS
</font><font color='#000088'>+      #define CONFIGURE_FILESYSTEM_MINIIMFS
</font>     #elif !defined(CONFIGURE_FILESYSTEM_IMFS)
       #define CONFIGURE_FILESYSTEM_IMFS
     #endif
<font color='#997700'>@@ -285,7 +285,7 @@
</font>  *  This defines the miniIMFS file system table entry.
  */<span style="background-color: #FF0000"> </span>
 #if !defined(CONFIGURE_FILESYSTEM_ENTRY_miniIMFS) && \
<font color='#880000'>-    defined(CONFIGURE_FILESYSTEM_miniIMFS)
</font><font color='#000088'>+    defined(CONFIGURE_FILESYSTEM_MINIIMFS)
</font>   #define CONFIGURE_FILESYSTEM_ENTRY_miniIMFS \
     { RTEMS_FILESYSTEM_TYPE_MINIIMFS, miniIMFS_initialize }
 #endif
<font color='#997700'>@@ -330,13 +330,13 @@
</font>   #endif
 
   /**
<font color='#880000'>-   * NFSFS
</font><font color='#000088'>+   * NFS
</font>    */<span style="background-color: #FF0000"> </span>
<font color='#880000'>-  #if !defined(CONFIGURE_FILESYSTEM_ENTRY_NFSFS) && \
-      defined(CONFIGURE_FILESYSTEM_NFSFS)
</font><font color='#000088'>+  #if !defined(CONFIGURE_FILESYSTEM_ENTRY_NFS) && \
+      defined(CONFIGURE_FILESYSTEM_NFS)
</font>     #include <librtemsNfs.h>
<font color='#880000'>-    #define CONFIGURE_FILESYSTEM_ENTRY_NFSFS \
-      { RTEMS_FILESYSTEM_TYPE_NFS, rtems_nfsfs_initialize }
</font><font color='#000088'>+    #define CONFIGURE_FILESYSTEM_ENTRY_NFS \
+      { RTEMS_FILESYSTEM_TYPE_NFS, rtems_nfs_initialize }
</font>   #endif
 #endif
 
<font color='#997700'>@@ -381,7 +381,7 @@
</font>   #endif
 
   #if defined(CONFIGURE_FILESYSTEM_IMFS) || \
<font color='#880000'>-      defined(CONFIGURE_FILESYSTEM_miniIMFS)
</font><font color='#000088'>+      defined(CONFIGURE_FILESYSTEM_MINIIMFS)
</font>     int imfs_rq_memfile_bytes_per_block = CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK;
   #endif
 
<font color='#997700'>@@ -396,7 +396,7 @@
</font>    */
   #ifndef CONFIGURE_HAS_OWN_FILESYSTEM_TABLE
     const rtems_filesystem_table_t rtems_filesystem_table[] = {
<font color='#880000'>-      #if defined(CONFIGURE_FILESYSTEM_miniIMFS) && \
</font><font color='#000088'>+      #if defined(CONFIGURE_FILESYSTEM_MINIIMFS) && \
</font>           defined(CONFIGURE_FILESYSTEM_ENTRY_miniIMFS)
         CONFIGURE_FILESYSTEM_ENTRY_miniIMFS,
       #endif
<font color='#997700'>@@ -416,9 +416,9 @@
</font>           defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS)
         CONFIGURE_FILESYSTEM_ENTRY_FTPFS,
       #endif
<font color='#880000'>-      #if defined(CONFIGURE_FILESYSTEM_NFSFS) && \
-          defined(CONFIGURE_FILESYSTEM_ENTRY_NFSFS)
-        CONFIGURE_FILESYSTEM_ENTRY_NFSFS,
</font><font color='#000088'>+      #if defined(CONFIGURE_FILESYSTEM_NFS) && \
+          defined(CONFIGURE_FILESYSTEM_ENTRY_NFS)
+        CONFIGURE_FILESYSTEM_ENTRY_NFS,
</font>       #endif
       #if defined(CONFIGURE_FILESYSTEM_DOSFS) && \
           defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS)
</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-07-01 Joel Sherrill <joel.sherrill@oarcorp.com>

        * libcsupport/src/getegid.c, libcsupport/src/gxx_wrappers.c,
        libcsupport/src/issetugid.c: Formatting and spacing.
</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.2479&r2=text&tr2=1.2480&diff_format=h">M</a></td><td width='1%'>1.2480</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/getegid.c.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%'>cpukit/libcsupport/src/getegid.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/gxx_wrappers.c.diff?r1=text&tr1=1.19&r2=text&tr2=1.20&diff_format=h">M</a></td><td width='1%'>1.20</td><td width='100%'>cpukit/libcsupport/src/gxx_wrappers.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/issetugid.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>cpukit/libcsupport/src/issetugid.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2479 rtems/cpukit/ChangeLog:1.2480
--- rtems/cpukit/ChangeLog:1.2479       Thu Jul  1 10:12:34 2010
+++ rtems/cpukit/ChangeLog      Thu Jul  1 10:37:46 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-07-01    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libcsupport/src/getegid.c, libcsupport/src/gxx_wrappers.c,
+       libcsupport/src/issetugid.c: Formatting and spacing.
+
</font> 2010-07-01        Jennifer Averett <Jennifer.Averett@OARcorp.com>
 
        * libcsupport/src/chdir.c, libcsupport/src/chmod.c,

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/getegid.c:1.3 rtems/cpukit/libcsupport/src/getegid.c:1.4
--- rtems/cpukit/libcsupport/src/getegid.c:1.3  Sun Apr 18 01:05:34 2004
+++ rtems/cpukit/libcsupport/src/getegid.c      Thu Jul  1 10:37:48 2010
</font><font color='#997700'>@@ -16,12 +16,6 @@
</font> #include <rtems/userenv.h>
 
 /*
<font color='#880000'>- * MACRO in userenv.h
-gid_t _POSIX_types_Egid = 0;
-*/
-
-/*PAGE
- *
</font>  *  4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
  *        P1003.1b-1993, p. 84
  */

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.19 rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.20
--- rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.19    Mon Jun 28 17:14:35 2010
+++ rtems/cpukit/libcsupport/src/gxx_wrappers.c Thu Jul  1 10:37:48 2010
</font><font color='#997700'>@@ -1,19 +1,19 @@
</font> /*
<font color='#880000'>- * RTEMS threads compatibily routines for libgcc2.
</font><font color='#000088'>+ *  RTEMS threads compatibility routines for libgcc2.
</font>  *
<font color='#880000'>- * by: Rosimildo da Silva ( rdasilva@connecttel.com
</font><font color='#000088'>+ *  by: Rosimildo da Silva (rdasilva@connecttel.com)
</font>  *
<font color='#880000'>- * Used ideas from:
</font><font color='#000088'>+ *  Used ideas from:
</font>  *    W. Eric Norum
  *    Canadian Light Source
  *    University of Saskatchewan
  *    Saskatoon, Saskatchewan, CANADA
  *    eric@cls.usask.ca
  *
<font color='#880000'>- * Eric sent some e-mail in the rtems-list as a start point for this
- * module implementation.
</font><font color='#000088'>+ *  Eric sent some e-mail in the rtems-list as a start point for this
+ *  module implementation.
</font>  *
<font color='#880000'>- * $Id$
</font><font color='#000088'>+ *  $Id$
</font>  */
 
 /*
<font color='#997700'>@@ -25,18 +25,17 @@
</font> #include "config.h"
 #endif
 
<font color='#880000'>-/* We might not need, defined just in case */
-#define  __RTEMS_INSIDE__  1
-
-
</font> #include <stdlib.h>
 #include <stdio.h>
 
 #include <rtems.h>
 #include <rtems/system.h>
<font color='#880000'>-#include <rtems/error.h><span style="background-color: #FF0000"> </span>       /* rtems_panic */
</font><font color='#000088'>+#include <rtems/error.h>
</font> #include <rtems/rtems/tasks.h>
 
<font color='#000088'>+/* uncomment this if you need to debug this interface */
+/*#define DEBUG_GXX_WRAPPERS 1*/
+
</font> /*
  * These typedefs should match with the ones defined in the file
  * gcc/gthr-rtems.h in the gcc distribution.
<font color='#997700'>@@ -44,136 +43,142 @@
</font>  *                            void * __gthread_key_t;
  */
 typedef struct __gthread_key_ {
<font color='#880000'>-   void *val;<span style="background-color: #FF0000"> </span>                   /* this is switched with the task      */
-       void (*dtor)(void*);   /* this remains in place for all tasks */
</font><font color='#000088'>+  void *val;             /* this is switched with the task      */
+  void (*dtor)(void*);   /* this remains in place for all tasks */
</font> } __gthread_key, *__gthread_key_t;
<font color='#000088'>+
</font> typedef int   __gthread_once_t;
 typedef void *__gthread_mutex_t;
 typedef void *__gthread_recursive_mutex_t;
 
<font color='#880000'>-/* uncomment this if you need to debug this interface */
-/*#define DEBUG_GXX_WRAPPERS 1*/
-
-#ifdef DEBUG_GXX_WRAPPERS
-/* local function to return the ID of the calling thread */
-static rtems_id gxx_get_tid( void )
-{
-   rtems_id id = 0;
-   rtems_task_ident( RTEMS_SELF, 0, &id );
-   return id;
-}
-#endif
-
-
</font> int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
 {
<font color='#880000'>-#ifdef DEBUG_GXX_WRAPPERS
-   printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
-#endif
-   if( *(volatile __gthread_once_t *)once == 0 )
-   {
-      rtems_mode saveMode;
-      __gthread_once_t o;
-      rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
-      if( (o = *(volatile __gthread_once_t *)once) == 0 )
-      {
-         *(volatile __gthread_once_t *)once = 1;
-      }
-      rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
-      if ( o == 0 )
-         (*func)();
-   }
-   return 0;
</font><font color='#000088'>+  #ifdef DEBUG_GXX_WRAPPERS
+    printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
+  #endif
+
+  if ( *(volatile __gthread_once_t *)once == 0 ) {
+    rtems_mode saveMode;
+    __gthread_once_t o;
+
+    rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
+    if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
+      *(volatile __gthread_once_t *)once = 1;
+    }
+    rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
+    if ( o == 0 )
+      (*func)();
+  }
+  return 0;
</font> }
 
<font color='#880000'>-
</font> int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
 {
<font color='#000088'>+  rtems_status_code status;
+
</font>   /* Ok, this can be a bit tricky. We are going to return a "key" as a
    * pointer to the buffer that will hold the value of the key itself.
    * We have to to this, because the others functions on this interface
    * deal with the value of the key, as used with the POSIX API.
    */
    /* Do not pull your hair, trust me this works. :-) */
<font color='#880000'>-  __gthread_key_t new_key = ( __gthread_key_t )malloc( sizeof( *new_key ) );
</font><font color='#000088'>+  __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
</font>   *key = new_key;
   new_key->val  = NULL;
   new_key->dtor = dtor;
 
<font color='#880000'>-#ifdef DEBUG_GXX_WRAPPERS
-  printk( "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key );
-#endif
</font><font color='#000088'>+  #ifdef DEBUG_GXX_WRAPPERS
+    printk(
+      "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
+    );
+  #endif
+
</font>   /* register with RTEMS the buffer that will hold the key values */
<font color='#880000'>-  if( rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ) == RTEMS_SUCCESSFUL )
</font><font color='#000088'>+  status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
+  if ( status == RTEMS_SUCCESSFUL )
</font>     return 0;
   return -1;
 }
 
 int rtems_gxx_key_dtor (__gthread_key_t key, void *ptr)
 {
<font color='#880000'>-#ifdef DEBUG_GXX_WRAPPERS
-  printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
-#endif
-   key->val  = 0;
-   return 0;
</font><font color='#000088'>+  #ifdef DEBUG_GXX_WRAPPERS
+    printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
+  #endif
+
+  key->val  = 0;
+  return 0;
</font> }
 
 int rtems_gxx_key_delete (__gthread_key_t key)
 {
<font color='#880000'>-#ifdef DEBUG_GXX_WRAPPERS
-  printk( "gxx_wrappers: delete key=%x\n", key );
-#endif
</font><font color='#000088'>+  rtems_status_code status;
+
+  #ifdef DEBUG_GXX_WRAPPERS
+    printk( "gxx_wrappers: delete key=%x\n", key );
+  #endif
+
</font>   /* register with RTEMS the buffer that will hold the key values */
<font color='#880000'>-  if( rtems_task_variable_delete( RTEMS_SELF, (void **)key ) == RTEMS_SUCCESSFUL )
-  {
-     /* Hmm - hopefully all tasks using this key have gone away... */
-     if( key ) free( (void *)key );
-     return 0;
</font><font color='#000088'>+  status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
+  if ( status == RTEMS_SUCCESSFUL ) {
+    /* Hmm - hopefully all tasks using this key have gone away... */
+    if ( key ) free( (void *)key );
+    return 0;
</font>   }
   return 0;
 }
 
<font color='#880000'>-
</font> void *rtems_gxx_getspecific(__gthread_key_t key)
 {
<font color='#880000'>-  void *p= 0;
</font><font color='#000088'>+  rtems_status_code  status;
+  void              *p= 0;
</font> 
   /* register with RTEMS the buffer that will hold the key values */
<font color='#880000'>-  if( rtems_task_variable_get( RTEMS_SELF, (void **)key, &p ) == RTEMS_SUCCESSFUL )
-  {
</font><font color='#000088'>+  status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p );
+  if ( status == RTEMS_SUCCESSFUL ) {
</font>     /* We do not have to do this, but what the heck ! */
      p= key->val;
<font color='#880000'>-  }
-  else
-  {
</font><font color='#000088'>+  } else {
</font>     /* fisrt time, always set to zero, it is unknown the value that the others
      * threads are using at the moment of this call
      */
<font color='#880000'>-    if( rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ) != RTEMS_SUCCESSFUL )
-    {
</font><font color='#000088'>+    status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
+    if ( status != RTEMS_SUCCESSFUL ) {
</font>        rtems_panic ("rtems_gxx_getspecific");
     }
     key->val = (void *)0;
   }
 
<font color='#880000'>-#ifdef DEBUG_GXX_WRAPPERS
-   printk( "gxx_wrappers: getspecific key=%x, ptr=%x, id=%x\n", key, p, gxx_get_tid() );
-#endif
-   return p;
</font><font color='#000088'>+  #ifdef DEBUG_GXX_WRAPPERS
+    printk(
+      "gxx_wrappers: getspecific key=%x, ptr=%x, id=%x\n",
+       key,
+       p,
+       rtems_task_self()
+    );
+  #endif
+  return p;
</font> }
 
<font color='#880000'>-
</font> int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
 {
<font color='#880000'>-#ifdef DEBUG_GXX_WRAPPERS
-  printk( "gxx_wrappers: setspecific key=%x, ptr=%x, id=%x\n", key, ptr, gxx_get_tid() );
-#endif
</font><font color='#000088'>+  rtems_status_code status;
+
+  #ifdef DEBUG_GXX_WRAPPERS
+    printk(
+      "gxx_wrappers: setspecific key=%x, ptr=%x, id=%x\n",
+      key,
+      ptr,
+      rtems_task_self()
+      );
+  #endif
+
</font>   /* register with RTEMS the buffer that will hold the key values */
<font color='#880000'>-  if( rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ) == RTEMS_SUCCESSFUL )
-  {
</font><font color='#000088'>+  status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
+  if ( status == RTEMS_SUCCESSFUL ) {
</font>     /* now let's set the proper value */
     key->val =  (void *)ptr;
<font color='#880000'>-     return 0;
</font><font color='#000088'>+    return 0;
</font>   }
   return -1;
 }
<font color='#997700'>@@ -184,61 +189,93 @@
</font>  */
 void rtems_gxx_mutex_init (__gthread_mutex_t *mutex)
 {
<font color='#880000'>-  rtems_status_code s;
-#ifdef DEBUG_GXX_WRAPPERS
-  printk( "gxx_wrappers: mutex init =%X\n", *mutex );
-#endif
-  if( (s = rtems_semaphore_create( rtems_build_name ('G', 'C', 'C', '2'),
-                              1,
-                             RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE
-                             |RTEMS_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
-                             0,
-                             (rtems_id *)mutex )) != RTEMS_SUCCESSFUL )
-  {
-#ifdef DEBUG_GXX_WRAPPERS
-      printk( "gxx_wrappers: mutex init failed %s (%d)\n", rtems_status_text(s), s );
-#endif
-      rtems_panic ("rtems_gxx_mutex_init");
</font><font color='#000088'>+  rtems_status_code status;
+
+  #ifdef DEBUG_GXX_WRAPPERS
+    printk( "gxx_wrappers: mutex init =%X\n", *mutex );
+  #endif
+
+  status = rtems_semaphore_create(
+    rtems_build_name ('G', 'C', 'C', '2'),
+    1,
+    RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|
+      RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
+    0,
+    (rtems_id *)mutex
+  );
+  if ( status != RTEMS_SUCCESSFUL ) {
+    #ifdef DEBUG_GXX_WRAPPERS
+      printk(
+        "gxx_wrappers: mutex init failed %s (%d)\n",
+        rtems_status_text(status),
+        status
+      );
+    #endif
+    rtems_panic ("rtems_gxx_mutex_init");
</font>   }
<font color='#880000'>-#ifdef DEBUG_GXX_WRAPPERS
-  printk( "gxx_wrappers: mutex init complete =%X\n", *mutex );
-#endif
</font><font color='#000088'>+  #ifdef DEBUG_GXX_WRAPPERS
+    printk( "gxx_wrappers: mutex init complete =%X\n", *mutex );
+  #endif
</font> }
 
 int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex)
 {
<font color='#880000'>-#ifdef DEBUG_GXX_WRAPPERS
-  printk( "gxx_wrappers: lock mutex=%X\n", *mutex );
-#endif
-  return ( rtems_semaphore_obtain( *(rtems_id *)mutex,
-            RTEMS_WAIT, RTEMS_NO_TIMEOUT ) ==  RTEMS_SUCCESSFUL) ? 0 : -1;
</font><font color='#000088'>+  rtems_status_code status;
+
+  #ifdef DEBUG_GXX_WRAPPERS
+    printk( "gxx_wrappers: lock mutex=%X\n", *mutex );
+  #endif
+
+  status = rtems_semaphore_obtain(
+    *(rtems_id *)mutex,
+    RTEMS_WAIT,
+    RTEMS_NO_TIMEOUT
+  );
+  if ( status == RTEMS_SUCCESSFUL )
+    return 0;
+  return -1;
</font> }
 
 int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex)
 {
<font color='#880000'>-#ifdef DEBUG_GXX_WRAPPERS
-  printk( "gxx_wrappers: destroy mutex=%X\n", *mutex );
-#endif
-  return ( rtems_semaphore_delete(*(rtems_id *)mutex)
-             ==  RTEMS_SUCCESSFUL) ? 0 : -1;
</font><font color='#000088'>+  rtems_status_code status;
+
+  #ifdef DEBUG_GXX_WRAPPERS
+    printk( "gxx_wrappers: destroy mutex=%X\n", *mutex );
+  #endif
+
+  status = rtems_semaphore_delete(*(rtems_id *)mutex);
+  if ( status == RTEMS_SUCCESSFUL )
+    return 0;
+  return -1;
</font> }
 
 int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex)
 {
<font color='#880000'>-#ifdef DEBUG_GXX_WRAPPERS
-  printk( "gxx_wrappers: trylock mutex=%X\n", *mutex );
-#endif
-  return (rtems_semaphore_obtain (*(rtems_id *)mutex,
-               RTEMS_NO_WAIT, 0) == RTEMS_SUCCESSFUL) ? 0 : -1;
</font><font color='#000088'>+  rtems_status_code status;
+
+  #ifdef DEBUG_GXX_WRAPPERS
+    printk( "gxx_wrappers: trylock mutex=%X\n", *mutex );
+  #endif
+
+  status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0);
+  if ( status == RTEMS_SUCCESSFUL )
+    return 0;
+  return -1;
</font> }
 
 int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex)
 {
<font color='#880000'>-#ifdef DEBUG_GXX_WRAPPERS
-   printk( "gxx_wrappers: unlock mutex=%X\n", *mutex );
-#endif
-  return (rtems_semaphore_release( *(rtems_id *)mutex )
-      == RTEMS_SUCCESSFUL) ? 0 :-1;
</font><font color='#000088'>+  rtems_status_code status;
+
+  #ifdef DEBUG_GXX_WRAPPERS
+    printk( "gxx_wrappers: unlock mutex=%X\n", *mutex );
+  #endif
+
+  status = rtems_semaphore_release( *(rtems_id *)mutex );
+  if ( status == RTEMS_SUCCESSFUL )
+    return 0;
+  return -1;
</font> }
 
 void rtems_gxx_recursive_mutex_init(__gthread_recursive_mutex_t *mutex)

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/issetugid.c:1.2 rtems/cpukit/libcsupport/src/issetugid.c:1.3
--- rtems/cpukit/libcsupport/src/issetugid.c:1.2        Wed Sep 30 03:20:27 2009
+++ rtems/cpukit/libcsupport/src/issetugid.c    Thu Jul  1 10:37:48 2010
</font><font color='#997700'>@@ -1,5 +1,5 @@
</font> /*
<font color='#880000'>- * Dummy version of BSD routine
</font><font color='#000088'>+ *  Dummy version of BSD routine
</font>  *
  *  $Id$
  */
<font color='#997700'>@@ -9,9 +9,8 @@
</font> #endif
 
 #if defined(RTEMS_NEWLIB) && !defined(HAVE_ISSETUGID)
<font color='#880000'>-int
-issetugid (void)
</font><font color='#000088'>+int issetugid (void)
</font> {
<font color='#880000'>-   return 0;
</font><font color='#000088'>+  return 0;
</font> }
 #endif
</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>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-07-01 Joel Sherrill <joel.sherrilL@OARcorp.com>

        PR 1594/filesystem
        * libfs/src/imfs/memfile.c: Include assert.h
</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.2480&r2=text&tr2=1.2481&diff_format=h">M</a></td><td width='1%'>1.2481</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/memfile.c.diff?r1=text&tr1=1.35&r2=text&tr2=1.36&diff_format=h">M</a></td><td width='1%'>1.36</td><td width='100%'>cpukit/libfs/src/imfs/memfile.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2480 rtems/cpukit/ChangeLog:1.2481
--- rtems/cpukit/ChangeLog:1.2480       Thu Jul  1 10:37:46 2010
+++ rtems/cpukit/ChangeLog      Thu Jul  1 10:39:23 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-07-01    Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+       PR 1594/filesystem
+       * libfs/src/imfs/memfile.c: Include assert.h
+
</font> 2010-07-01        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * libcsupport/src/getegid.c, libcsupport/src/gxx_wrappers.c,

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/memfile.c:1.35 rtems/cpukit/libfs/src/imfs/memfile.c:1.36
--- rtems/cpukit/libfs/src/imfs/memfile.c:1.35  Thu Jun 24 17:01:49 2010
+++ rtems/cpukit/libfs/src/imfs/memfile.c       Thu Jul  1 10:39:23 2010
</font><font color='#997700'>@@ -31,6 +31,10 @@
</font> #include <rtems/libio_.h>
 #include <rtems/seterr.h>
 
<font color='#000088'>+#if defined(RTEMS_DEBUG)
+  #include <assert.h>
+#endif
+
</font> #define MEMFILE_STATIC
 
 /*
</pre>
<p> </p>
<a name='cs5'></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-07-01 Joel Sherrill <joel.sherrill@oarcorp.com>

        * libcsupport/src/rtems_memalign.c, score/include/rtems/score/heap.h:
        Remove stray references to malloc boundary.
</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.2481&r2=text&tr2=1.2482&diff_format=h">M</a></td><td width='1%'>1.2482</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/rtems_memalign.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/libcsupport/src/rtems_memalign.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/include/rtems/score/heap.h.diff?r1=text&tr1=1.42&r2=text&tr2=1.43&diff_format=h">M</a></td><td width='1%'>1.43</td><td width='100%'>cpukit/score/include/rtems/score/heap.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2481 rtems/cpukit/ChangeLog:1.2482
--- rtems/cpukit/ChangeLog:1.2481       Thu Jul  1 10:39:23 2010
+++ rtems/cpukit/ChangeLog      Thu Jul  1 10:39:58 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-07-01    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libcsupport/src/rtems_memalign.c, score/include/rtems/score/heap.h:
+       Remove stray references to malloc boundary.
+
</font> 2010-07-01        Joel Sherrill <joel.sherrilL@OARcorp.com>
 
        PR 1594/filesystem

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/rtems_memalign.c:1.4 rtems/cpukit/libcsupport/src/rtems_memalign.c:1.5
--- rtems/cpukit/libcsupport/src/rtems_memalign.c:1.4   Wed Jun 30 10:36:48 2010
+++ rtems/cpukit/libcsupport/src/rtems_memalign.c       Thu Jul  1 10:39:59 2010
</font><font color='#997700'>@@ -66,14 +66,6 @@
</font>   if ( rtems_malloc_statistics_helpers )
     (*rtems_malloc_statistics_helpers->at_malloc)(pointer);
 
<font color='#880000'>-  #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
-    /*
-     * If configured, set the boundary area
-     */
-    if (rtems_malloc_boundary_helpers)
-      (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
-  #endif
-
</font>   *pointer = return_this;
   return 0;
 }

<font color='#006600'>diff -u rtems/cpukit/score/include/rtems/score/heap.h:1.42 rtems/cpukit/score/include/rtems/score/heap.h:1.43
--- rtems/cpukit/score/include/rtems/score/heap.h:1.42  Mon Jun  7 04:35:01 2010
+++ rtems/cpukit/score/include/rtems/score/heap.h       Thu Jul  1 10:39:59 2010
</font><font color='#997700'>@@ -539,7 +539,6 @@
</font> 
 #ifdef RTEMS_DEBUG
   #define RTEMS_HEAP_DEBUG
<font color='#880000'>-  #define RTEMS_MALLOC_BOUNDARY_HELPERS
</font> #endif
 
 #ifdef RTEMS_HEAP_DEBUG
</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>