<!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 (2011-11-06)</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>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>
PR 1945/cpukit
* umon/tfsDriver.c: Replace rtems_off64_t with off_t.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/shared/ChangeLog.diff?r1=text&tr1=1.193&r2=text&tr2=1.194&diff_format=h">M</a></td><td width='1%'>1.194</td><td width='100%'>c/src/lib/libbsp/shared/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/shared/umon/tfsDriver.c.diff?r1=text&tr1=1.11&r2=text&tr2=1.12&diff_format=h">M</a></td><td width='1%'>1.12</td><td width='100%'>c/src/lib/libbsp/shared/umon/tfsDriver.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/shared/ChangeLog:1.193 rtems/c/src/lib/libbsp/shared/ChangeLog:1.194
--- rtems/c/src/lib/libbsp/shared/ChangeLog:1.193 Thu Oct 20 10:33:09 2011
+++ rtems/c/src/lib/libbsp/shared/ChangeLog Sun Nov 6 06:36:55 2011
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ PR 1945/cpukit
+ * umon/tfsDriver.c: Replace rtems_off64_t with off_t.
+
</font> 2011-10-20 Ralf Corsépius <ralf.corsepius@rtems.org>
* console.c: Include <rtems/error.h> for rtems_panic().
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/shared/umon/tfsDriver.c:1.11 rtems/c/src/lib/libbsp/shared/umon/tfsDriver.c:1.12
--- rtems/c/src/lib/libbsp/shared/umon/tfsDriver.c:1.11 Wed Oct 19 04:43:36 2011
+++ rtems/c/src/lib/libbsp/shared/umon/tfsDriver.c Sun Nov 6 06:36:55 2011
</font><font color='#997700'>@@ -614,9 +614,9 @@
</font> return(ret);
}
<font color='#880000'>-static rtems_off64_t rtems_tfs_lseek(
</font><font color='#000088'>+static off_t rtems_tfs_lseek(
</font> rtems_libio_t *iop,
<font color='#880000'>- rtems_off64_t offset,
</font><font color='#000088'>+ off_t offset,
</font> int whence
)
{
<font color='#997700'>@@ -643,7 +643,7 @@
</font> if (ret < 0)
return(-1);
<font color='#880000'>- return (rtems_off64_t)ret;
</font><font color='#000088'>+ return (off_t)ret;
</font> }
/*
<font color='#997700'>@@ -651,7 +651,7 @@
</font> */
static int rtems_tfs_ftruncate(
rtems_libio_t *iop,
<font color='#880000'>- rtems_off64_t count
</font><font color='#000088'>+ off_t count
</font> )
{
int ret, fd;
</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>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>
PR 1945/cpukit
* libchip/i2c/spi-memdrv.c: Replace rtems_off64_t with off_t.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/ChangeLog.diff?r1=text&tr1=1.570&r2=text&tr2=1.571&diff_format=h">M</a></td><td width='1%'>1.571</td><td width='100%'>c/src/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/libchip/i2c/spi-memdrv.c.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>c/src/libchip/i2c/spi-memdrv.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/ChangeLog:1.570 rtems/c/src/ChangeLog:1.571
--- rtems/c/src/ChangeLog:1.570 Fri Oct 28 08:58:22 2011
+++ rtems/c/src/ChangeLog Sun Nov 6 06:40:21 2011
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ PR 1945/cpukit
+ * libchip/i2c/spi-memdrv.c: Replace rtems_off64_t with off_t.
+
</font> 2011-10-28 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1944/misc
<font color='#006600'>diff -u rtems/c/src/libchip/i2c/spi-memdrv.c:1.5 rtems/c/src/libchip/i2c/spi-memdrv.c:1.6
--- rtems/c/src/libchip/i2c/spi-memdrv.c:1.5 Thu Jul 7 17:15:24 2011
+++ rtems/c/src/libchip/i2c/spi-memdrv.c Sun Nov 6 06:40:21 2011
</font><font color='#997700'>@@ -126,7 +126,7 @@
</font> {
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *rwargs = arg;
<font color='#880000'>- rtems_off64_t off = rwargs->offset;
</font><font color='#000088'>+ off_t off = rwargs->offset;
</font> int cnt = rwargs->count;
unsigned char *buf = (unsigned char *)rwargs->buffer;
int bytes_sent = 0;
<font color='#997700'>@@ -312,7 +312,7 @@
</font> {
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *rwargs = arg;
<font color='#880000'>- rtems_off64_t off = rwargs->offset;
</font><font color='#000088'>+ off_t off = rwargs->offset;
</font> int cnt = rwargs->count;
unsigned char *buf = (unsigned char *)rwargs->buffer;
unsigned char cmdbuf[4];
</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>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>Remove stray whitespaces.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/devfs/devfs_init.c.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>cpukit/libfs/src/devfs/devfs_init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/devfs/devstat.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/libfs/src/devfs/devstat.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/dosfs/msdos_dir.c.diff?r1=text&tr1=1.22&r2=text&tr2=1.23&diff_format=h">M</a></td><td width='1%'>1.23</td><td width='100%'>cpukit/libfs/src/dosfs/msdos_dir.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/dosfs/msdos_file.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/libfs/src/dosfs/msdos_file.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/dosfs/msdos_misc.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/libfs/src/dosfs/msdos_misc.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/dosfs/msdos_rename.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/libfs/src/dosfs/msdos_rename.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_eval.c.diff?r1=text&tr1=1.34&r2=text&tr2=1.35&diff_format=h">M</a></td><td width='1%'>1.35</td><td width='100%'>cpukit/libfs/src/imfs/imfs_eval.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_fifo.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>cpukit/libfs/src/imfs/imfs_fifo.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_link.c.diff?r1=text&tr1=1.13&r2=text&tr2=1.14&diff_format=h">M</a></td><td width='1%'>1.14</td><td width='100%'>cpukit/libfs/src/imfs/imfs_link.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_load_tar.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/libfs/src/imfs/imfs_load_tar.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_mknod.c.diff?r1=text&tr1=1.16&r2=text&tr2=1.17&diff_format=h">M</a></td><td width='1%'>1.17</td><td width='100%'>cpukit/libfs/src/imfs/imfs_mknod.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_rename.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/libfs/src/imfs/imfs_rename.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_stat.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/libfs/src/imfs/imfs_stat.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_symlink.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/libfs/src/imfs/imfs_symlink.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps-ut.c.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-bitmaps-ut.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.h.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/libfs/src/rfs/rtems-rfs-bitmaps.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.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/libfs/src/rfs/rtems-rfs-bitmaps.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-block-pos.h.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-block-pos.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-block.h.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-block.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-block.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer-bdbuf.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-buffer-bdbuf.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer-devio.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/libfs/src/rfs/rtems-rfs-buffer-devio.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer.h.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-buffer.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-buffer.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.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/libfs/src/rfs/rtems-rfs-dir-hash.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-dir.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-file-system.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-file.h.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/libfs/src/rfs/rtems-rfs-file.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-file.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-file.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-format.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-group.h.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-group.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-group.c.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-group.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.h.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-inode.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-inode.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-link.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-mutex.h.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-mutex.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-mutex.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/libfs/src/rfs/rtems-rfs-mutex.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.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/libfs/src/rfs/rtems-rfs-rtems-file.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-utils.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/libfs/src/rfs/rtems-rfs-rtems-utils.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c.diff?r1=text&tr1=1.19&r2=text&tr2=1.20&diff_format=h">M</a></td><td width='1%'>1.20</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-rtems.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-shell.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/libfs/src/rfs/rtems-rfs-shell.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-trace.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/libfs/src/rfs/rtems-rfs-trace.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/libfs/src/devfs/devfs_init.c:1.6 rtems/cpukit/libfs/src/devfs/devfs_init.c:1.7
--- rtems/cpukit/libfs/src/devfs/devfs_init.c:1.6 Tue Jun 29 14:37:28 2010
+++ rtems/cpukit/libfs/src/devfs/devfs_init.c Sun Nov 6 06:44:22 2011
</font><font color='#997700'>@@ -35,7 +35,7 @@
</font> rtems_filesystem_default_symlink,
rtems_filesystem_default_readlink,
rtems_filesystem_default_rename,
<font color='#880000'>- rtems_filesystem_default_statvfs<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ rtems_filesystem_default_statvfs
</font> };
<font color='#006600'>diff -u rtems/cpukit/libfs/src/devfs/devstat.c:1.3 rtems/cpukit/libfs/src/devfs/devstat.c:1.4
--- rtems/cpukit/libfs/src/devfs/devstat.c:1.3 Thu Jul 22 19:11:32 2010
+++ rtems/cpukit/libfs/src/devfs/devstat.c Sun Nov 6 06:44:22 2011
</font><font color='#997700'>@@ -36,7 +36,7 @@
</font> #if defined(RTEMS_DEBUG)
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
<font color='#880000'>- #endif<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ #endif
</font>
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
buf->st_mode = the_dev->mode;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/dosfs/msdos_dir.c:1.22 rtems/cpukit/libfs/src/dosfs/msdos_dir.c:1.23
--- rtems/cpukit/libfs/src/dosfs/msdos_dir.c:1.22 Sun Nov 6 05:54:49 2011
+++ rtems/cpukit/libfs/src/dosfs/msdos_dir.c Sun Nov 6 06:44:22 2011
</font><font color='#997700'>@@ -497,7 +497,7 @@
</font> * RC_OK on success, or -1 if error occured (errno
* set apropriately).
*/
<font color='#880000'>-off_t<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+off_t
</font> msdos_dir_lseek(rtems_libio_t *iop, off_t offset, int whence)
{
switch (whence)
<font color='#006600'>diff -u rtems/cpukit/libfs/src/dosfs/msdos_file.c:1.17 rtems/cpukit/libfs/src/dosfs/msdos_file.c:1.18
--- rtems/cpukit/libfs/src/dosfs/msdos_file.c:1.17 Sun Nov 6 05:54:49 2011
+++ rtems/cpukit/libfs/src/dosfs/msdos_file.c Sun Nov 6 06:44:22 2011
</font><font color='#997700'>@@ -222,7 +222,7 @@
</font> * new offset on success, or -1 if error occured (errno set
* appropriately).
*/
<font color='#880000'>-off_t<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+off_t
</font> msdos_file_lseek(rtems_libio_t *iop, off_t offset, int whence)
{
int rc = RC_OK;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/dosfs/msdos_misc.c:1.27 rtems/cpukit/libfs/src/dosfs/msdos_misc.c:1.28
--- rtems/cpukit/libfs/src/dosfs/msdos_misc.c:1.27 Wed Feb 23 07:57:02 2011
+++ rtems/cpukit/libfs/src/dosfs/msdos_misc.c Sun Nov 6 06:44:22 2011
</font><font color='#997700'>@@ -125,7 +125,7 @@
</font> #if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: c:%02x type:%d\n", *name, type);
#endif
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
<font color='#997700'>@@ -170,7 +170,7 @@
</font> #endif
return MSDOS_NAME_LONG;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> #if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
<font color='#997700'>@@ -283,7 +283,7 @@
</font>
if (pathlen == 0)
return MSDOS_NO_MORE_PATH;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Check for a separator.
*/
<font color='#006600'>diff -u rtems/cpukit/libfs/src/dosfs/msdos_rename.c:1.2 rtems/cpukit/libfs/src/dosfs/msdos_rename.c:1.3
--- rtems/cpukit/libfs/src/dosfs/msdos_rename.c:1.2 Sun Jul 4 09:53:47 2010
+++ rtems/cpukit/libfs/src/dosfs/msdos_rename.c Sun Nov 6 06:44:22 2011
</font><font color='#997700'>@@ -79,14 +79,14 @@
</font> rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.34 rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.35
--- rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.34 Thu Jul 21 07:03:26 2011
+++ rtems/cpukit/libfs/src/imfs/imfs_eval.c Sun Nov 6 06:44:22 2011
</font><font color='#997700'>@@ -578,7 +578,7 @@
</font> if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
node = pathloc->node_access;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* It would be a design error if we evaluated the link and
* was broken.
<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_fifo.c:1.9 rtems/cpukit/libfs/src/imfs/imfs_fifo.c:1.10
--- rtems/cpukit/libfs/src/imfs/imfs_fifo.c:1.9 Sun Nov 6 05:57:10 2011
+++ rtems/cpukit/libfs/src/imfs/imfs_fifo.c Sun Nov 6 06:44:22 2011
</font><font color='#997700'>@@ -56,7 +56,7 @@
</font>
iop->flags &= ~LIBIO_FLAGS_OPEN;
IMFS_check_node_remove(jnode);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> IMFS_FIFO_RETURN(err);
}
<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_link.c:1.13 rtems/cpukit/libfs/src/imfs/imfs_link.c:1.14
--- rtems/cpukit/libfs/src/imfs/imfs_link.c:1.13 Tue Jan 19 13:31:00 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_link.c Sun Nov 6 06:44:22 2011
</font><font color='#997700'>@@ -55,7 +55,7 @@
</font> * was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
<font color='#880000'>- * this path.<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * this path.
</font> */
new_node = IMFS_create_node(
parent_loc,
<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_load_tar.c:1.19 rtems/cpukit/libfs/src/imfs/imfs_load_tar.c:1.20
--- rtems/cpukit/libfs/src/imfs/imfs_load_tar.c:1.19 Tue Jul 27 13:11:42 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_load_tar.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -19,7 +19,7 @@
</font> * Directories from the TAR file are created as usual in the IMFS.
* File entries are created as IMFS_LINEAR_FILE nodes with their nods
* pointing to addresses in the TAR image.
<font color='#880000'>- */<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ */
</font>
#include <sys/types.h>
#include <sys/stat.h>
<font color='#997700'>@@ -160,7 +160,7 @@
</font> * IMFS_create_node was ONLY passed a NULL when we created the
* root node. We added a new IMFS_create_root_node() so this
* path no longer existed. The result was simpler code which
<font color='#880000'>- * should not have this path.<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * should not have this path.
</font> */
else if (linkflag == REGTYPE) {
const char *name;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_mknod.c:1.16 rtems/cpukit/libfs/src/imfs/imfs_mknod.c:1.17
--- rtems/cpukit/libfs/src/imfs/imfs_mknod.c:1.16 Tue Aug 2 14:25:59 2011
+++ rtems/cpukit/libfs/src/imfs/imfs_mknod.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -55,7 +55,7 @@
</font> rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
} else if (S_ISFIFO(mode))
type = IMFS_FIFO;
<font color='#880000'>- else<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ else
</font> IMFS_assert( 0 );
/*
<font color='#997700'>@@ -66,7 +66,7 @@
</font> * was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
<font color='#880000'>- * this path.<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * this path.
</font> */
new_node = IMFS_create_node( pathloc, type, new_name, mode, &info );
if ( !new_node )
<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_rename.c:1.1 rtems/cpukit/libfs/src/imfs/imfs_rename.c:1.2
--- rtems/cpukit/libfs/src/imfs/imfs_rename.c:1.1 Thu Mar 4 00:36:51 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_rename.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -36,15 +36,15 @@
</font> the_jnode = old_loc->node_access;
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if ( the_jnode->Parent != NULL )
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
the_jnode->Parent = new_parent;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Update the time.
*/
<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_stat.c:1.15 rtems/cpukit/libfs/src/imfs/imfs_stat.c:1.16
--- rtems/cpukit/libfs/src/imfs/imfs_stat.c:1.15 Fri Jun 10 13:16:42 2011
+++ rtems/cpukit/libfs/src/imfs/imfs_stat.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -66,7 +66,7 @@
</font> fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_symlink.c:1.14 rtems/cpukit/libfs/src/imfs/imfs_symlink.c:1.15
--- rtems/cpukit/libfs/src/imfs/imfs_symlink.c:1.14 Tue Jan 19 13:31:00 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_symlink.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> * was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
<font color='#880000'>- * this path.<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * this path.
</font> */
new_node = IMFS_create_node(
parent_loc,
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps-ut.c:1.6 rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps-ut.c:1.7
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps-ut.c:1.6 Wed Jun 16 21:48:37 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps-ut.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -60,7 +60,7 @@
</font> return false;
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> printf (" %2d. Test bit range (%" PRId32 ",%ld] all %s: pass\n",
test, bit, bit + size - 1, set ? "set" : "clear");
<font color='#997700'>@@ -76,7 +76,7 @@
</font> bool state;
int i;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> printf (" %2d. Set all bits\n", test);
rc = rtems_rfs_bitmap_map_set_all (control);
if (rc > 0)
<font color='#997700'>@@ -84,13 +84,13 @@
</font> printf (" %2d. set all bits: FAIL (%s)\n", test, strerror (rc));
return false;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (i = 0; i < size; i++)
rtems_rfs_bitmap_map_clear (control, bit + i);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> printf (" %2d. Cleared bits (%" PRId32 ", %ld] (%zd)\n",
test, bit, bit + size - 1, size);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (i = 0; i < rtems_rfs_bitmap_element_bits (); i++)
{
rc = rtems_rfs_bitmap_map_test (control, bit + i, &state);
<font color='#997700'>@@ -105,7 +105,7 @@
</font> return false;
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (i = 0, bit = 0; i < size; i++)
{
rtems_rfs_bitmap_bit seed = bit;
<font color='#997700'>@@ -127,7 +127,7 @@
</font>
printf (" %2d. Alloc'ed all bits (%" PRId32 ", %ld] (%zd)\n",
test, bit, bit + size - 1, size);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return true;
}
<font color='#997700'>@@ -151,7 +151,7 @@
</font>
memset (&fs, 0, sizeof (fs));
memset (&buffer, 0, sizeof (buffer));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> buffer.buffer = malloc (bytes);
buffer.block = 1;
<font color='#997700'>@@ -166,7 +166,7 @@
</font> #else
memset (buffer.buffer, 0xff, bytes);
#endif
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Do not close the handle so no writes need occur.
*/
<font color='#997700'>@@ -180,10 +180,10 @@
</font>
handle.buffer = &buffer;
handle.bnum = 1;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> printf ("\nRFS Bitmap Test : size = %zd (%zd)\n",
size, rtems_rfs_bitmap_elements (size));
<font color='#880000'>- rc = rtems_rfs_bitmap_open (&control, &fs, &handle, size, 1);<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ rc = rtems_rfs_bitmap_open (&control, &fs, &handle, size, 1);
</font> if (rc > 0)
{
printf (" Cannot open the bitmap: %s\n", strerror (rc));
<font color='#997700'>@@ -199,7 +199,7 @@
</font> printf (" 1. Find bit with seed > size: %s (%s)\n",
result ? "FAIL" : "pass", strerror (rc));
rtems_rfs_exit_on_error (rc, result, &control, buffer.buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_map_alloc (&control, size, &result, &bit);
printf (" 2. Find bit with seed = size: %s (%s)\n",
result ? "FAIL" : "pass", strerror (rc));
<font color='#997700'>@@ -210,14 +210,14 @@
</font> printf (" 3. Find bit 0 with seed = 0: %s (%s): bit = %" PRId32 "\n",
result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_map_alloc (&control, size - 1, &result, &bit);
result = result && (bit == (size - 1));
printf (" 4. Find bit (size - 1) with seed = (size - 1) (%zd): %s (%s): bit = %" PRId32 "\n",
size - 1, result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Test the bits allocated to make sure they are set.
*/
<font color='#997700'>@@ -226,12 +226,12 @@
</font> printf (" 5. Test bit 0: %s (%s)\n",
result ? "pass" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_map_test (&control, size - 1, &result);
printf (" 6. Test bit (size - 1) (%zd): %s (%s)\n",
size - 1, result ? "pass" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (!rtems_rfs_bitmap_ut_test_range (&control, 7, false, 1, size - 2))
rtems_rfs_exit_on_error (0, !result, &control, buffer.buffer);
<font color='#997700'>@@ -244,7 +244,7 @@
</font> rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
bit = rand () % size;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_map_clear (&control, bit);
printf (" 9. Clear bit %" PRId32 ": %s (%s)\n",
bit, rc == 0 ? "PASS" : "FAIL", strerror (rc));
<font color='#997700'>@@ -256,18 +256,18 @@
</font> printf (" 10. Find bit with seed = 0: %s (%s): bit = %" PRId32 "\n",
result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_map_alloc (&control, 0, &result, &bit);
result = !result || (bit != last_bit);
printf (" 11. Fail to find bit with seed = 0: %s (%s): bit = %" PRId32 "\n",
result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_map_clear (&control, 0);
printf (" 12. Clear bit 0: %s (%s)\n",
rc == 0 ? "pass" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_map_alloc (&control, size - 1, &result, &bit);
result = result && (bit == 0);
printf (" 13. Find bit with seed = (size - 1): %s (%s): bit = %" PRId32 "\n",
<font color='#997700'>@@ -288,7 +288,7 @@
</font> rc = rtems_rfs_bitmap_map_clear (&control, 0);
printf (" 16. Clear bit 0: %s (%s)\n",
rc == 0 ? "pass" : "FAIL", strerror (rc));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_map_alloc (&control, size / 2, &result, &bit);
result = result && (bit == 0);
printf (" 17. Find bit with seed = (size / 2) (%zd): %s (%s): bit = %" PRId32 "\n",
<font color='#997700'>@@ -299,7 +299,7 @@
</font> printf (" 18. Clear bit (size - 1) (%zd): %s, (%s)\n",
size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_map_alloc (&control, size / 2, &result, &bit);
result = result && (bit == (size - 1));
printf (" 19. Find bit with seed = (size / 2) (%zd): %s (%s): bit = %" PRId32 "\n",
<font color='#997700'>@@ -309,7 +309,7 @@
</font> rc = rtems_rfs_bitmap_map_clear (&control, 0);
printf (" 20. Clear bit 0: %s (%s)\n",
rc == 0 ? "pass" : "FAIL", strerror (rc));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_map_alloc (&control, (size / 2) - 1, &result, &bit);
result = result && (bit == 0);
printf (" 21. Find bit with seed = ((size / 2) - 1) (%zd): %s (%s): bit = %" PRId32 "\n",
<font color='#997700'>@@ -319,7 +319,7 @@
</font> rc = rtems_rfs_bitmap_map_clear (&control, size - 1);
printf (" 22. Clear bit (size - 1) (%zd): %s (%s)\n",
size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_map_alloc (&control, (size / 2) - 1, &result, &bit);
result = result && (bit == (size - 1));
printf (" 23. Find bit with seed = ((size / 2) - 1) (%zd): %s (%s): bit = %" PRId32 "\n",
<font color='#997700'>@@ -330,7 +330,7 @@
</font> result = rtems_rfs_bitmap_ut_alloc_seq_test (&control, 23, bit,
rtems_rfs_bitmap_element_bits ());
rtems_rfs_exit_on_error (0, !result, &control, buffer.buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> bit = rand () % (size / 2) + rtems_rfs_bitmap_element_bits ();
result = rtems_rfs_bitmap_ut_alloc_seq_test (&control, 24, bit, 57);
rtems_rfs_exit_on_error (0, !result, &control, buffer.buffer);
<font color='#997700'>@@ -344,7 +344,7 @@
</font> rc == 0 ? "PASS" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
<font color='#880000'>- first_bit = rand () % (size / 2) + rtems_rfs_bitmap_element_bits ();<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ first_bit = rand () % (size / 2) + rtems_rfs_bitmap_element_bits ();
</font> last_bit = first_bit + rand () % (size / 2) + rtems_rfs_bitmap_element_bits ();
for (bit = first_bit; bit < last_bit; bit++)
<font color='#997700'>@@ -357,10 +357,10 @@
</font> rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> printf (" 26. Clear bit (%" PRId32 ", %" PRId32 "]: %s (%s)\n",
first_bit, last_bit, rc == 0 ? "PASS" : "FAIL", strerror (rc));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> clear = rtems_rfs_bitmap_map_free (&control);
result = clear == (last_bit - first_bit);
printf (" 27. Check free count is %zd: %" PRId32 ": %s (%s)\n",
<font color='#997700'>@@ -373,7 +373,7 @@
</font> clear, rtems_rfs_bitmap_map_free (&control),
result ? "pass" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_bitmap_close (&control);
free (buffer.buffer);
}
<font color='#997700'>@@ -391,7 +391,7 @@
</font> #else
srand (0x2398);
#endif
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_bitmap_ut_test_bitmap (2048);
rtems_rfs_bitmap_ut_test_bitmap (420);
}
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.h:1.3 rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.h:1.4
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.h:1.3 Wed Jun 16 22:09:00 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.h Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -197,7 +197,7 @@
</font> * @param end The end bit of the mask numbered from 0.
* @return Mask section as defined by the start and end arguments.
*/
<font color='#880000'>-rtems_rfs_bitmap_element rtems_rfs_bitmap_mask_section (unsigned int start,<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+rtems_rfs_bitmap_element rtems_rfs_bitmap_mask_section (unsigned int start,
</font> unsigned int end);
/**
<font color='#997700'>@@ -240,7 +240,7 @@
</font> *
* @param control The bitmap control.
* @return int The error number (errno). No error if 0.
<font color='#880000'>- */<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ */
</font> int rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control);
/**
<font color='#997700'>@@ -248,7 +248,7 @@
</font> *
* @param control The bitmap control.
* @return int The error number (errno). No error if 0.
<font color='#880000'>- */<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ */
</font> int rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control);
/**
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c:1.2 rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c:1.3
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c:1.2 Fri Mar 26 23:04:40 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -44,7 +44,7 @@
</font> * @retval false The bit is clear.
*/
static bool
<font color='#880000'>-rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
</font> rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
<font color='#997700'>@@ -59,7 +59,7 @@
</font> * same bit in the target.
*/
static rtems_rfs_bitmap_element
<font color='#880000'>-rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
</font> rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
<font color='#997700'>@@ -106,7 +106,7 @@
</font> * @param bits1 One set of bits to match.
* @param bits2 The second set of bits to match.
* @retval true The bits match.
<font color='#880000'>- * @retval false The bits do not match.<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * @retval false The bits do not match.
</font> */
static bool
rtems_rfs_bitmap_match (rtems_rfs_bitmap_element bits1,
<font color='#997700'>@@ -124,7 +124,7 @@
</font> * @param bits1 One set of bits to match.
* @param bits2 The second set of bits to match.
* @retval true The bits match.
<font color='#880000'>- * @retval false The bits do not match.<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * @retval false The bits do not match.
</font> */
static bool
rtems_rfs_bitmap_match_masked (rtems_rfs_bitmap_element mask,
<font color='#997700'>@@ -147,19 +147,19 @@
</font> rtems_rfs_bitmap_map* map)
{
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (!control->buffer)
return ENXIO;
*map = NULL;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_request (control->fs,
control->buffer,
control->block,
true);
if (rc)
return rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> *map = rtems_rfs_buffer_data (control->buffer);
return 0;
}
<font color='#997700'>@@ -267,16 +267,16 @@
</font> rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> elements = rtems_rfs_bitmap_elements (elements);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (e = 0; e < elements; e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
<font color='#997700'>@@ -293,15 +293,15 @@
</font> size_t elements;
int e;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> elements = rtems_rfs_bitmap_elements (control->size);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> control->free = elements;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
<font color='#997700'>@@ -313,12 +313,12 @@
</font>
if (last_search_bit == 0)
last_search_bit = rtems_rfs_bitmap_element_bits ();
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> elements = rtems_rfs_bitmap_elements (elements);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (e = 0; e < (elements - 1); e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> control->search_bits[elements - 1] =
rtems_rfs_bitmap_merge (RTEMS_RFS_BITMAP_ELEMENT_CLEAR,
RTEMS_RFS_BITMAP_ELEMENT_SET,
<font color='#997700'>@@ -348,14 +348,14 @@
</font> int rc;
*found = false;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Calculate the bit we are testing plus the end point we search over.
*/
<font color='#997700'>@@ -366,7 +366,7 @@
</font> end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
<font color='#997700'>@@ -374,7 +374,7 @@
</font>
search_bits = &control->search_bits[search_index];
map_bits = &map[map_index];
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Check each bit from the search map offset for a clear bit.
*/
<font color='#997700'>@@ -424,11 +424,11 @@
</font> map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> search_offset += direction;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (((direction < 0) && (test_bit <= end_bit))
|| ((direction > 0) && (test_bit >= end_bit)))
break;
<font color='#997700'>@@ -473,7 +473,7 @@
</font> }
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -492,7 +492,7 @@
</font> * By default we assume the allocation failed.
*/
*allocated = false;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* The window is the number of bits we search over in either direction each
* time.
<font color='#997700'>@@ -549,7 +549,7 @@
</font> if (lower_seed >= 0)
lower_seed -= window;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -561,7 +561,7 @@
</font> size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
<font color='#997700'>@@ -570,7 +570,7 @@
</font> search_map = control->search_bits;
size = control->size;
bit = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> *search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
{
<font color='#997700'>@@ -588,7 +588,7 @@
</font> bits = *map;
available = rtems_rfs_bitmap_element_bits ();
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
rtems_rfs_bitmap_set (*search_map, bit);
else
<font color='#997700'>@@ -600,7 +600,7 @@
</font> }
size -= available;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
<font color='#997700'>@@ -623,15 +623,15 @@
</font> rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> control->buffer = buffer;
control->fs = fs;
control->block = block;
control->size = size;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (!control->search_bits)
return ENOMEM;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-block-pos.h:1.6 rtems/cpukit/libfs/src/rfs/rtems-rfs-block-pos.h:1.7
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-block-pos.h:1.6 Tue Mar 15 00:14:39 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-block-pos.h Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -126,7 +126,7 @@
</font> rtems_rfs_pos_rel offset,
rtems_rfs_block_pos* bpos)
{
<font color='#880000'>- rtems_rfs_block_get_bpos (fs,<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ rtems_rfs_block_get_bpos (fs,
</font> rtems_rfs_block_get_pos (fs, bpos) + offset,
bpos);
bpos->block = 0;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-block.h:1.4 rtems/cpukit/libfs/src/rfs/rtems-rfs-block.h:1.5
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-block.h:1.4 Tue Mar 15 00:02:34 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-block.h Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -51,7 +51,7 @@
</font> ((_b) * sizeof (rtems_rfs_block_no)), (_n)); \
rtems_rfs_buffer_mark_dirty (_h); \
} while (0)
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /**
* A block map manges the block lists that originate from an inode. The inode
* contains a number of block numbers. A block map takes those block numbers
<font color='#997700'>@@ -196,7 +196,7 @@
</font> * @param map Pointer to the open map to set the offset in.
* @param offset The offset to set in the map's size.
*/
<font color='#880000'>-static inline void<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+static inline void
</font> rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
<font color='#997700'>@@ -210,7 +210,7 @@
</font> * @param map Pointer to the open map to set the offset in.
* @param size The size to set in the map's size.
*/
<font color='#880000'>-static inline void<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+static inline void
</font> rtems_rfs_block_map_set_size (rtems_rfs_block_map* map,
rtems_rfs_block_size* size)
{
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c:1.7 rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c:1.8
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c:1.7 Sun Oct 10 23:34:48 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -109,7 +109,7 @@
</font> map->inode = NULL;
rtems_rfs_block_set_size_zero (&map->size);
rtems_rfs_block_set_bpos_zero (&map->bpos);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_open (fs, &map->singly_buffer);
if (rc > 0)
return rc;
<font color='#997700'>@@ -124,7 +124,7 @@
</font> rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Extract the block and block count data from the inode into the targets
* byte order.
<font color='#997700'>@@ -138,7 +138,7 @@
</font> map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -154,7 +154,7 @@
</font> brc = rtems_rfs_inode_load (fs, map->inode);
if (brc > 0)
rc = brc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rc == 0)
{
int b;
<font color='#997700'>@@ -169,7 +169,7 @@
</font> brc = rtems_rfs_inode_unload (fs, map->inode, true);
if (brc > 0)
rc = brc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> map->dirty = false;
}
}
<font color='#997700'>@@ -225,7 +225,7 @@
</font> *result = 0;
rc = EIO;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -238,7 +238,7 @@
</font> int rc = 0;
*block = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Range checking here makes the remaining logic simpler.
*/
<font color='#997700'>@@ -270,7 +270,7 @@
</font> */
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> direct = bpos->bno % fs->blocks_per_block;
singly = bpos->bno / fs->blocks_per_block;
<font color='#997700'>@@ -316,7 +316,7 @@
</font> */
rc = ENXIO;
}
<font color='#880000'>- }<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ }
</font> }
}
<font color='#997700'>@@ -325,7 +325,7 @@
</font> rtems_rfs_block_copy_bpos (&map->bpos, bpos);
map->bpos.block = *block;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -409,7 +409,7 @@
</font> rtems_rfs_block_no* new_block)
{
int b;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
<font color='#997700'>@@ -425,12 +425,12 @@
</font> {
rtems_rfs_bitmap_bit block;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Allocate the block. If an indirect block is needed and cannot be
* allocated free this block.
*/
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_group_bitmap_alloc (fs, map->last_data_block,
false, &block);
if (rc > 0)
<font color='#997700'>@@ -445,7 +445,7 @@
</font> */
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> direct = map->size.count % fs->blocks_per_block;
singly = map->size.count / fs->blocks_per_block;
<font color='#997700'>@@ -561,7 +561,7 @@
</font>
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly_block, true);
if (rc > 0)
<font color='#997700'>@@ -577,7 +577,7 @@
</font>
map->size.count++;
map->size.offset = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (b == 0)
*new_block = block;
map->last_data_block = block;
<font color='#997700'>@@ -617,7 +617,7 @@
</font> ((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if ((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS))
{
/*
<font color='#997700'>@@ -634,14 +634,14 @@
</font> */
map->blocks[indirect] = 0;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> map->last_map_block = block_to_free;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -653,10 +653,10 @@
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (map->size.count == 0)
return 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (blocks > map->size.count)
blocks = map->size.count;
<font color='#997700'>@@ -667,7 +667,7 @@
</font> int rc;
block = map->size.count - 1;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (block < RTEMS_RFS_INODE_BLOCKS)
{
/*
<font color='#997700'>@@ -702,7 +702,7 @@
</font> map->blocks[singly], true);
if (rc > 0)
return rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
direct);
<font color='#997700'>@@ -752,14 +752,14 @@
</font> rc = rtems_rfs_group_bitmap_free (fs, false, singly);
if (rc > 0)
return rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> map->last_map_block = singly;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
doubly, doubly_singly);
if (rc)
return rc;
<font color='#880000'>- }<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ }
</font> }
else
{
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer-bdbuf.c:1.4 rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer-bdbuf.c:1.5
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer-bdbuf.c:1.4 Wed Jun 16 11:59:43 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer-bdbuf.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -85,7 +85,7 @@
</font> #endif
rc = EIO;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer-devio.c:1.2 rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer-devio.c:1.3
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer-devio.c:1.2 Fri Mar 26 23:04:40 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer-devio.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -34,7 +34,7 @@
</font>
int
rtems_rfs_buffer_deviceio_request (rtems_rfs_buffer_handle* handle,
<font color='#880000'>- dev_t device,<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ dev_t device,
</font> rtems_rfs_buffer_block block,
bool read)
{
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer.h:1.4 rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer.h:1.5
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer.h:1.4 Sun Oct 10 23:34:48 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer.h Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -168,7 +168,7 @@
</font> * @param read Read the data from the disk.
* @return int The error number (errno). No error if 0.
*/
<font color='#880000'>-int rtems_rfs_buffer_handle_request (rtems_rfs_file_system* fs,<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+int rtems_rfs_buffer_handle_request (rtems_rfs_file_system* fs,
</font> rtems_rfs_buffer_handle* handle,
rtems_rfs_buffer_block block,
bool read);
<font color='#997700'>@@ -197,7 +197,7 @@
</font> rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
<font color='#880000'>- handle->bnum = 0;<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ handle->bnum = 0;
</font> handle->buffer = NULL;
return 0;
}
<font color='#997700'>@@ -215,7 +215,7 @@
</font> {
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
<font color='#880000'>- handle->bnum = 0;<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ handle->bnum = 0;
</font> handle->buffer = NULL;
return 0;
}
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer.c:1.7 rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer.c:1.8
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer.c:1.7 Wed Jun 16 22:16:41 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-buffer.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -41,7 +41,7 @@
</font> {
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
<font color='#997700'>@@ -81,7 +81,7 @@
</font> bool read)
{
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* If the handle has a buffer release it. This allows a handle to be reused
* without needing to close then open it again.
<font color='#997700'>@@ -158,7 +158,7 @@
</font> rtems_rfs_buffer_mark_dirty (handle);
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* If not located we request the buffer from the I/O layer.
*/
<font color='#997700'>@@ -183,15 +183,15 @@
</font> rtems_rfs_buffer_refs_up (handle);
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> handle->buffer->user = (void*) ((intptr_t) block);
handle->bnum = block;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -200,7 +200,7 @@
</font> rtems_rfs_buffer_handle* handle)
{
int rc = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_buffer_handle_has_block (handle))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
<font color='#997700'>@@ -212,12 +212,12 @@
</font>
if (rtems_rfs_buffer_refs (handle) > 0)
rtems_rfs_buffer_refs_down (handle);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
<font color='#997700'>@@ -240,11 +240,11 @@
</font> {
rtems_rfs_buffer* buffer;
bool modified;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: local cache overflow:"
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (fs->release_count > fs->release_modified_count)
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
<font color='#997700'>@@ -261,7 +261,7 @@
</font> buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_buffer_dirty (handle))
{
rtems_chain_append (&fs->release_modified,
<font color='#997700'>@@ -277,7 +277,7 @@
</font> }
handle->buffer = NULL;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -288,7 +288,7 @@
</font>
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (stat (name, &st) < 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
<font color='#997700'>@@ -333,7 +333,7 @@
</font> printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -354,7 +354,7 @@
</font> if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
rc, strerror (rc));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> #if RTEMS_RFS_USE_LIBBLOCK
rtems_disk_release (fs->disk);
#else
<font color='#997700'>@@ -366,7 +366,7 @@
</font> rc, strerror (rc));
}
#endif
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -418,12 +418,12 @@
</font> if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
rc, strerror (rc));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_sync (fs);
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
rc, strerror (rc));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> #if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
if (rc < 0)
<font color='#997700'>@@ -450,7 +450,7 @@
</font> (*count)--;
buffer->user = (void*) 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
rrc = rc;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c:1.2 rtems/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c:1.3
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c:1.2 Fri Mar 26 23:04:40 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -56,10 +56,10 @@
</font> If four pairs of (a,b,c) inputs are run through mix(), or through mix() in
reverse, there are at least 32 bits of the output that are sometimes the same
for one pair and different for another pair. This was tested for:
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> * pairs that differed by one bit, by two bits, in any combination of top bits
of (a,b,c), or in any combination of bottom bits of (a,b,c).
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> * "differ" is defined as +, -, ^, or ~^. For + and -, I transformed the
output delta to a Gray code (a^(a>>1)) so a string of 1's (as is commonly
produced by subtraction) look like a single 1-bit difference.
<font color='#997700'>@@ -69,11 +69,11 @@
</font>
Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that satisfy this
are:
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> 4 6 8 16 19 4
9 15 3 18 27 15
14 9 3 7 17 3
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing for "differ" defined
as + with a one-bit base and a two-bit delta. I used
http://burtleburtle.net/bob/hash/avalanche.html to choose the operations,
<font color='#997700'>@@ -106,10 +106,10 @@
</font>
Pairs of (a,b,c) values differing in only a few bits will usually produce
values of c that look totally different. This was tested for
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> * pairs that differed by one bit, by two bits, in any combination of top bits
of (a,b,c), or in any combination of bottom bits of (a,b,c).
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> * "differ" is defined as +, -, ^, or ~^. For + and -, I transformed the
output delta to a Gray code (a^(a>>1)) so a string of 1's (as is commonly
produced by subtraction) look like a single 1-bit difference. * the base
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c:1.9 rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c:1.10
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c:1.9 Sun Nov 6 01:08:32 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-dir.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -77,7 +77,7 @@
</font>
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_block_map_open (fs, inode, &map);
if (rc > 0)
{
<font color='#997700'>@@ -86,7 +86,7 @@
</font> rtems_rfs_inode_ino (inode), rc, strerror (rc));
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_open (fs, &entries);
if (rc > 0)
{
<font color='#997700'>@@ -105,7 +105,7 @@
</font> * Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Locate the first block. The map points to the start after open so just
* seek 0. If an error the block will be 0.
<font color='#997700'>@@ -122,16 +122,16 @@
</font> rtems_rfs_block_map_close (fs, &map);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> while ((rc == 0) && block)
{
uint8_t* entry;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
- rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
+ rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
</font> if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
<font color='#997700'>@@ -146,21 +146,21 @@
</font> */
entry = rtems_rfs_buffer_data (&entries);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
<font color='#997700'>@@ -170,7 +170,7 @@
</font> rc = EIO;
break;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
<font color='#997700'>@@ -183,7 +183,7 @@
</font> if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
{
*offset = rtems_rfs_block_map_pos (fs, &map);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
printf ("rtems-rfs: dir-lookup-ino: "
"entry found in ino %" PRIu32 ", ino=%" PRIu32 " offset=%" PRIu32 "\n",
<font color='#997700'>@@ -222,7 +222,7 @@
</font> rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
<font color='#997700'>@@ -249,7 +249,7 @@
</font> printf ("%c", name[c]);
printf (", len=%zd\n", length);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
<font color='#997700'>@@ -260,19 +260,19 @@
</font> rtems_rfs_block_map_close (fs, &map);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Search the map from the beginning to find any empty space.
*/
rtems_rfs_block_set_bpos_zero (&bpos);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> while (true)
{
rtems_rfs_block_no block;
uint8_t* entry;
int offset;
bool read = true;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Locate the first block. If an error the block will be 0. If the map is
* empty which happens when creating a directory and adding the first entry
<font color='#997700'>@@ -307,7 +307,7 @@
</font> }
bpos.bno++;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
if (rc > 0)
{
<font color='#997700'>@@ -317,14 +317,14 @@
</font> rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> entry = rtems_rfs_buffer_data (&buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
<font color='#997700'>@@ -353,7 +353,7 @@
</font>
break;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
<font color='#997700'>@@ -364,12 +364,12 @@
</font> rtems_rfs_block_map_close (fs, &map);
return EIO;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> entry += elength;
offset += elength;
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
<font color='#997700'>@@ -380,7 +380,7 @@
</font> rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
<font color='#880000'>-{<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+{
</font> rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
<font color='#997700'>@@ -420,7 +420,7 @@
</font> {
uint8_t* entry;
int eoffset;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
<font color='#997700'>@@ -439,9 +439,9 @@
</font> eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> entry = rtems_rfs_buffer_data (&buffer) + eoffset;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
<font color='#997700'>@@ -452,7 +452,7 @@
</font>
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
<font color='#997700'>@@ -499,7 +499,7 @@
</font> rtems_rfs_inode_ino (dir), rc, strerror (rc));
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_buffer_mark_dirty (&buffer);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
<font color='#997700'>@@ -511,7 +511,7 @@
</font> rc = EIO;
break;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> entry += elength;
eoffset += elength;
}
<font color='#997700'>@@ -523,7 +523,7 @@
</font> rc = ENOENT;
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
<font color='#997700'>@@ -546,7 +546,7 @@
</font> rtems_rfs_inode_ino (dir), offset);
*length = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
<font color='#997700'>@@ -555,7 +555,7 @@
</font> (offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
rtems_rfs_fs_block_size (fs));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
<font color='#997700'>@@ -564,7 +564,7 @@
</font> rtems_rfs_block_map_close (fs, &map);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_open (fs, &buffer);
if (rc > 0)
{
<font color='#997700'>@@ -580,9 +580,9 @@
</font> {
uint8_t* entry;
rtems_rfs_ino eino;
<font color='#880000'>- int elength;<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ int elength;
</font> int remaining;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
<font color='#997700'>@@ -593,7 +593,7 @@
</font>
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
<font color='#997700'>@@ -608,7 +608,7 @@
</font> rc = EIO;
break;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
<font color='#997700'>@@ -616,19 +616,19 @@
</font> *length += elength;
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
*length += remaining;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
if (elength > NAME_MAX)
elength = NAME_MAX;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
dirent->d_namlen = elength;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: found off:%" PRIooff_t " ino:%ld name=%s\n",
dirent->d_off, dirent->d_ino, dirent->d_name);
<font color='#997700'>@@ -636,11 +636,11 @@
</font> }
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
<font color='#997700'>@@ -665,7 +665,7 @@
</font> printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
<font color='#997700'>@@ -676,7 +676,7 @@
</font> rtems_rfs_block_map_close (fs, &map);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_open (fs, &buffer);
if (rc > 0)
{
<font color='#997700'>@@ -692,14 +692,14 @@
</font> {
uint8_t* entry;
int offset;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
<font color='#997700'>@@ -720,7 +720,7 @@
</font> rc = EIO;
break;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
<font color='#997700'>@@ -753,7 +753,7 @@
</font>
if ((rc == 0) && !empty)
rc = ENOTEMPTY;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.8 rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.9
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.8 Thu Nov 3 01:32:42 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -71,9 +71,9 @@
</font> }
sb = rtems_rfs_buffer_data (&handle);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> #define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
<font color='#997700'>@@ -102,7 +102,7 @@
</font> rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
<font color='#997700'>@@ -111,7 +111,7 @@
</font> rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
<font color='#997700'>@@ -120,7 +120,7 @@
</font>
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
<font color='#997700'>@@ -129,7 +129,7 @@
</font> fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
<font color='#997700'>@@ -206,10 +206,10 @@
</font> rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: %s\n", name);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> *fs = malloc (sizeof (rtems_rfs_file_system));
if (!*fs)
{
<font color='#997700'>@@ -291,7 +291,7 @@
</font> return -1;
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_close (*fs, &inode);
if (rc > 0)
{
<font color='#997700'>@@ -302,7 +302,7 @@
</font> errno = rc;
return -1;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> errno = 0;
return 0;
}
<font color='#997700'>@@ -311,7 +311,7 @@
</font> rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
int group;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
<font color='#997700'>@@ -319,7 +319,7 @@
</font> rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> free (fs);
<font color='#880000'>- return 0;<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ return 0;
</font> }
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-file.h:1.2 rtems/cpukit/libfs/src/rfs/rtems-rfs-file.h:1.3
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-file.h:1.2 Wed Jun 16 09:39:14 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-file.h Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -55,9 +55,9 @@
</font> * map.
*/
rtems_rfs_block_map map;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /**
<font color='#880000'>- * The size of the file as taken from the inode. The map's size and<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * The size of the file as taken from the inode. The map's size and
</font> * this size should be the same.
*/
rtems_rfs_block_size size;
<font color='#997700'>@@ -152,7 +152,7 @@
</font> * @oaram shared The shared file data.
* @return rtems_rfs_pos The data size in bytes.
*/
<font color='#880000'>-static inline rtems_rfs_pos<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+static inline rtems_rfs_pos
</font> rtems_rfs_file_shared_get_size (rtems_rfs_file_system* fs,
rtems_rfs_file_shared* shared)
{
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-file.c:1.7 rtems/cpukit/libfs/src/rfs/rtems-rfs-file.c:1.8
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-file.c:1.7 Tue Mar 15 00:02:34 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-file.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -40,7 +40,7 @@
</font>
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> *file = NULL;
/*
<font color='#997700'>@@ -63,7 +63,7 @@
</font> free (handle);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Scan the file system data list of open files for this ino. If found up
* the reference count and return the pointer to the data.
<font color='#997700'>@@ -90,7 +90,7 @@
</font> }
memset (shared, 0, sizeof (rtems_rfs_file_shared));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
if (rc > 0)
{
<font color='#997700'>@@ -134,9 +134,9 @@
</font>
handle->flags = flags;
handle->shared = shared;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> *file = handle;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -148,7 +148,7 @@
</font> int rc;
rrc = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
handle->shared->inode.ino);
<font color='#997700'>@@ -177,7 +177,7 @@
</font> rtems_rfs_block_map_set_size (&handle->shared->map,
&handle->shared->size);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
if (rc > 0)
{
<font color='#997700'>@@ -187,7 +187,7 @@
</font> if (rrc == 0)
rrc = rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
if (rc > 0)
{
<font color='#997700'>@@ -197,7 +197,7 @@
</font> if (rrc == 0)
rrc = rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_chain_extract (&handle->shared->link);
free (handle->shared);
}
<font color='#997700'>@@ -205,7 +205,7 @@
</font> rc = rtems_rfs_buffer_handle_close (fs, &handle->buffer);
if ((rrc == 0) && (rc > 0))
rrc = rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rrc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
<font color='#997700'>@@ -213,7 +213,7 @@
</font> }
free (handle);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rrc;
}
<font color='#997700'>@@ -223,19 +223,19 @@
</font> bool read)
{
size_t size;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
read ? "read" : "write", handle->bpos.bno, handle->bpos.boff);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (!rtems_rfs_buffer_handle_has_block (&handle->buffer))
{
rtems_rfs_buffer_block block;
bool request_read;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> request_read = read;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
<font color='#997700'>@@ -250,13 +250,13 @@
</font> *available = 0;
return 0;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rc != ENXIO)
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: grow\n");
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
1, &block);
<font color='#997700'>@@ -277,31 +277,31 @@
</font> (*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
request_read = true;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: block=%" PRIu32 " request-read=%s\n",
block, request_read ? "yes" : "no");
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
rtems_rfs_file_buffer (handle),
block, request_read);
if (rc > 0)
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (read
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> *available = size - rtems_rfs_file_block_offset (handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -318,7 +318,7 @@
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
read ? "read" : "write", size);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
{
if (!read)
<font color='#997700'>@@ -330,7 +330,7 @@
</font> printf (
"rtems-rfs: file-io: end: error on release: %s size=%zu: %d: %s\n",
read ? "read" : "write", size, rc, strerror (rc));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
}
<font color='#997700'>@@ -354,7 +354,7 @@
</font>
length = false;
mtime = false;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (!read &&
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle)))
<font color='#997700'>@@ -364,16 +364,16 @@
</font> length = true;
mtime = true;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> atime = rtems_rfs_file_update_atime (handle);
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
length = rtems_rfs_file_update_length (handle) && length;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (atime || mtime)
{
time_t now = time (NULL);
<font color='#997700'>@@ -389,7 +389,7 @@
</font> handle->shared->size.offset =
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -410,7 +410,7 @@
</font> {
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-seek: new=%" PRIu64 "\n", pos);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* This call only sets the position if it is in a valid part of the file. The
* user can request past the end of the file then write to extend the
<font color='#997700'>@@ -425,7 +425,7 @@
</font> if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
handle->shared))
rtems_rfs_file_set_bpos (handle, pos);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> *new_pos = pos;
return 0;
}
<font color='#997700'>@@ -453,7 +453,7 @@
</font> else
{
size = rtems_rfs_file_size (handle);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* If the file is same size do nothing else grow or shrink it ?
*/
<font color='#997700'>@@ -471,7 +471,7 @@
</font> count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> while (count)
{
rtems_rfs_buffer_block block;
<font color='#997700'>@@ -529,7 +529,7 @@
</font> rtems_rfs_file_buffer (handle));
if (rc > 0)
return rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> count -= length - bpos.boff;
}
}
<font color='#997700'>@@ -540,7 +540,7 @@
</font> */
rtems_rfs_block_no blocks;
uint32_t offset;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
<font color='#997700'>@@ -548,7 +548,7 @@
</font>
offset =
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (blocks)
{
int rc;
<font color='#997700'>@@ -574,7 +574,7 @@
</font>
if (rtems_rfs_file_update_mtime (handle))
handle->shared->mtime = time (NULL);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c:1.9 rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c:1.10
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c:1.9 Thu Nov 3 01:32:42 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -112,11 +112,11 @@
</font>
if (fs->block_size < 512)
fs->block_size = 512;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
{
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
<font color='#997700'>@@ -139,14 +139,14 @@
</font> printf ("group block count is higher than bits in block\n");
return false;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
/*
* The bits per block sets the upper limit for the number of blocks in a
* group. The disk will be divided into groups which are the number of bits
* per block.
<font color='#880000'>- */<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ */
</font> fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
rtems_rfs_bits_per_block (fs));
<font color='#997700'>@@ -154,13 +154,13 @@
</font> if (!fs->group_inodes)
{
int inode_overhead = RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
inode_overhead = config->inode_overhead;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> fs->group_inodes = rtems_rfs_inodes_from_percent (fs, inode_overhead);
}
<font color='#997700'>@@ -171,7 +171,7 @@
</font> fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
fs->inodes_per_block) * fs->inodes_per_block;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
fs->group_inodes = rtems_rfs_bitmap_numof_bits (fs->block_size);
<font color='#997700'>@@ -180,7 +180,7 @@
</font> {
fs->max_name_length = 512;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return true;
}
<font color='#997700'>@@ -197,7 +197,7 @@
</font> int blocks;
int b;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
<font color='#997700'>@@ -234,7 +234,7 @@
</font>
if (verbose)
printf (", blocks");
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Open the block bitmap using the new buffer.
*/
<font color='#997700'>@@ -253,7 +253,7 @@
</font> * whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Clear the bitmap.
*/
<font color='#997700'>@@ -266,7 +266,7 @@
</font> group, rc, strerror (rc));
return false;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Forced allocation of the block bitmap.
*/
<font color='#997700'>@@ -304,7 +304,7 @@
</font>
if (verbose)
printf (", inodes");
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
<font color='#997700'>@@ -323,7 +323,7 @@
</font> * whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0x00, rtems_rfs_fs_block_size (fs));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Clear the inode bitmap.
*/
<font color='#997700'>@@ -336,7 +336,7 @@
</font> " clear all failed: %d: %s\n", group, rc, strerror (rc));
return false;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Close the inode bitmap.
*/
<font color='#997700'>@@ -369,17 +369,17 @@
</font> rc, strerror (rc));
return false;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_buffer_mark_dirty (&handle);
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_close (fs, &handle);
if (rc > 0)
{
<font color='#997700'>@@ -387,7 +387,7 @@
</font> rc, strerror (rc));
return false;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return true;
}
<font color='#997700'>@@ -416,9 +416,9 @@
</font> }
sb = rtems_rfs_buffer_data (&handle);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> #define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
<font color='#997700'>@@ -450,7 +450,7 @@
</font> rc, strerror (rc));
return false;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return true;
}
<font color='#997700'>@@ -474,7 +474,7 @@
</font> errno, strerror (errno));
return -1;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
if (rc > 0)
{
<font color='#997700'>@@ -490,7 +490,7 @@
</font> rtems_rfs_fs_close (fs);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
<font color='#997700'>@@ -508,22 +508,22 @@
</font> if (rc > 0)
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
rc, strerror (rc));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
if (rc > 0)
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
rc, strerror (rc));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
rc, strerror (rc));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
errno, strerror (errno));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -536,7 +536,7 @@
</font>
if (config->verbose)
printf ("rtems-rfs: format: %s\n", name);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> memset (&fs, 0, sizeof (rtems_rfs_file_system));
rtems_chain_initialize_empty (&fs.buffers);
<font color='#997700'>@@ -550,7 +550,7 @@
</font> fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Open the buffer interface.
*/
<font color='#997700'>@@ -571,7 +571,7 @@
</font> rtems_rfs_fs_media_block_size (&fs));
return -1;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Check the configuration data.
*/
<font color='#997700'>@@ -611,7 +611,7 @@
</font> rc, strerror (rc));
return -1;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
<font color='#997700'>@@ -625,7 +625,7 @@
</font>
if (config->verbose)
printf ("\n");
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_close (&fs);
if (rc > 0)
{
<font color='#997700'>@@ -641,6 +641,6 @@
</font> rc, strerror (rc));
return -1;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-group.h:1.4 rtems/cpukit/libfs/src/rfs/rtems-rfs-group.h:1.5
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-group.h:1.4 Wed Jun 16 09:39:14 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-group.h Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -37,7 +37,7 @@
</font> * bit allocator for blocks in the group simpler plus is allows a simple way to
* localise access to files and directories.
*/
<font color='#880000'>-typedef struct _rtems_rfs_group<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+typedef struct _rtems_rfs_group
</font> {
/**
* Base block number.
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-group.c:1.6 rtems/cpukit/libfs/src/rfs/rtems-rfs-group.c:1.7
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-group.c:1.6 Sun Oct 10 23:34:48 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-group.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -35,7 +35,7 @@
</font> rtems_rfs_group* group)
{
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (base >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
<font color='#997700'>@@ -55,15 +55,15 @@
</font> */
if (inodes > size)
inodes = size;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
base, size, inodes);
group->base = base;
group->size = size;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
- rc = rtems_rfs_buffer_handle_open (fs, &group->block_bitmap_buffer);<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
+ rc = rtems_rfs_buffer_handle_open (fs, &group->block_bitmap_buffer);
</font> if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
<font color='#997700'>@@ -114,7 +114,7 @@
</font> rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -144,7 +144,7 @@
</font> rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return result;
}
<font color='#997700'>@@ -168,13 +168,13 @@
</font> }
else
size = fs->group_blocks;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
updown = true;
direction = 1;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Try the goal group first and if that group fails try the groups either
* side until the whole file system has be tried.
<font color='#997700'>@@ -193,7 +193,7 @@
</font> group = group_start + (direction * offset);
if (offset)
bit = direction > 0 ? 0 : size - 1;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
<font color='#997700'>@@ -212,14 +212,14 @@
</font> bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
if (rc > 0)
return rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_fs_release_bitmaps (fs))
rtems_rfs_bitmap_release_buffer (fs, bitmap);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (allocated)
{
if (inode)
<font color='#997700'>@@ -237,7 +237,7 @@
</font>
offset++;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
<font color='#997700'>@@ -263,25 +263,25 @@
</font> {
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
<font color='#880000'>- }<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ }
</font> else
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_bitmap_release_buffer (fs, bitmap);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -307,26 +307,26 @@
</font> return EINVAL;
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
<font color='#880000'>- }<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ }
</font> else
{
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_bitmap_release_buffer (fs, bitmap);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -336,10 +336,10 @@
</font> size_t* inodes)
{
int g;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> *blocks = 0;
*inodes = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
<font color='#997700'>@@ -355,7 +355,7 @@
</font> *blocks = rtems_rfs_fs_blocks (fs);
if (*inodes > rtems_rfs_fs_inodes (fs))
*inodes = rtems_rfs_fs_inodes (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.h:1.5 rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.h:1.6
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.h:1.5 Wed Jun 16 09:39:14 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.h Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -581,7 +581,7 @@
</font> * @param load If true load the inode into memory from the media.
* @return int The error number (errno). No error if 0.
*/
<font color='#880000'>-int rtems_rfs_inode_open (rtems_rfs_file_system* fs,<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+int rtems_rfs_inode_open (rtems_rfs_file_system* fs,
</font> rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load);
<font color='#997700'>@@ -675,7 +675,7 @@
</font> * loaded.
*/
int rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
<font color='#880000'>- bool atime,<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ bool atime,
</font> bool mtime);
/**
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c:1.6 rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c:1.7
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c:1.6 Thu Mar 3 00:22:48 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -60,20 +60,20 @@
</font> int gino;
int index;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
return EINVAL;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
<font color='#997700'>@@ -106,7 +106,7 @@
</font> handle->loads);
rc = EIO;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> handle->ino = 0;
return rc;
}
<font color='#997700'>@@ -127,7 +127,7 @@
</font> if (!rtems_rfs_inode_is_loaded (handle))
{
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
handle->block, true);
if (rc > 0)
<font color='#997700'>@@ -138,7 +138,7 @@
</font> }
handle->loads++;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -148,19 +148,19 @@
</font> bool update_ctime)
{
int rc = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
printf ("rtems-rfs: inode-unload: ino=%" PRIu32 " loads=%i loaded=%s\n",
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
return EIO;
handle->loads--;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (handle->loads == 0)
{
/*
<font color='#997700'>@@ -172,7 +172,7 @@
</font> handle->node = NULL;
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -190,7 +190,7 @@
</font> rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
<font color='#997700'>@@ -225,7 +225,7 @@
</font> default:
return EINVAL;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_alloc (fs, parent, ino);
if (rc > 0)
return rc;
<font color='#997700'>@@ -236,7 +236,7 @@
</font> rtems_rfs_inode_free (fs, *ino);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
if (rc > 0)
{
<font color='#997700'>@@ -287,7 +287,7 @@
</font> if (RTEMS_RFS_S_ISDIR (mode))
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_close (fs, &parent_inode);
if (rc > 0)
{
<font color='#997700'>@@ -302,7 +302,7 @@
</font> rtems_rfs_inode_free (fs, *ino);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -311,7 +311,7 @@
</font> rtems_rfs_inode_handle* handle)
{
int rc = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
rtems_rfs_inode_ino (handle),
<font color='#997700'>@@ -327,7 +327,7 @@
</font> rc = rtems_rfs_inode_free (fs, handle->ino);
if (rc > 0)
return rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Free the blocks the inode may have attached.
*/
<font color='#997700'>@@ -377,7 +377,7 @@
</font>
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
<font color='#880000'>- bool atime,<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ bool atime,
</font> bool mtime)
{
time_t now;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c:1.4 rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c:1.5
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c:1.4 Tue Jun 15 18:34:56 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-link.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -67,7 +67,7 @@
</font> rtems_rfs_inode_close (fs, &target_inode);
return ENOTSUP;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
if (rc)
{
<font color='#997700'>@@ -82,7 +82,7 @@
</font> rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> links = rtems_rfs_inode_get_links (&target_inode) + 1;
rtems_rfs_inode_set_links (&target_inode, links);
<font color='#997700'>@@ -125,12 +125,12 @@
</font> rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
if (rc)
return rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* If a directory process the unlink mode.
*/
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
- dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
+ dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
</font> if (dir)
{
switch (dir_mode)
<font color='#997700'>@@ -156,7 +156,7 @@
</font> break;
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
if (rc)
{
<font color='#997700'>@@ -166,7 +166,7 @@
</font> rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
if (rc > 0)
{
<font color='#997700'>@@ -177,7 +177,7 @@
</font> rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> links = rtems_rfs_inode_get_links (&target_inode);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
<font color='#997700'>@@ -212,7 +212,7 @@
</font> rtems_rfs_inode_set_links (&parent_inode, links);
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
if (rc > 0)
{
<font color='#997700'>@@ -239,7 +239,7 @@
</font> if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
rc, strerror (rc));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -256,7 +256,7 @@
</font> rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
<font color='#997700'>@@ -270,13 +270,13 @@
</font>
if (link_length >= rtems_rfs_fs_block_size (fs))
return ENAMETOOLONG;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
return rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
return rc;
<font color='#997700'>@@ -298,7 +298,7 @@
</font> rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
uint8_t* data;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_block_map_open (fs, &inode, &map);
if (rc > 0)
{
<font color='#997700'>@@ -331,7 +331,7 @@
</font> }
data = rtems_rfs_buffer_data (&buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> memset (data, 0xff, rtems_rfs_fs_block_size (fs));
memcpy (data, link, link_length);
<font color='#997700'>@@ -350,11 +350,11 @@
</font> return rc;
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -367,7 +367,7 @@
</font> {
rtems_rfs_inode_handle inode;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
<font color='#997700'>@@ -382,13 +382,13 @@
</font> }
*length = rtems_rfs_inode_get_block_offset (&inode);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (size < *length)
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_inode_get_block_count (&inode) == 0)
{
memcpy (path, inode.node->data.name, *length);
<font color='#997700'>@@ -399,7 +399,7 @@
</font> rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
char* data;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_block_map_open (fs, &inode, &map);
if (rc > 0)
{
<font color='#997700'>@@ -453,6 +453,6 @@
</font> path[*length] = '\0';
rc = rtems_rfs_inode_close (fs, &inode);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-mutex.h:1.1 rtems/cpukit/libfs/src/rfs/rtems-rfs-mutex.h:1.2
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-mutex.h:1.1 Wed Feb 17 18:24:25 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-mutex.h Sun Nov 6 06:44:24 2011
</font><font color='#997700'>@@ -71,7 +71,7 @@
</font> {
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
<font color='#880000'>- printf ("rtems-rfs: mutex: obtain failed: %s\n",<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ printf ("rtems-rfs: mutex: obtain failed: %s\n",
</font> rtems_status_text (sc));
#endif
return EIO;
<font color='#997700'>@@ -96,7 +96,7 @@
</font> {
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
<font color='#880000'>- printf ("rtems-rfs: mutex: release failed: %s\n",<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ printf ("rtems-rfs: mutex: release failed: %s\n",
</font> rtems_status_text (sc));
#endif
return EIO;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-mutex.c:1.2 rtems/cpukit/libfs/src/rfs/rtems-rfs-mutex.c:1.3
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-mutex.c:1.2 Fri Mar 26 23:04:40 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-mutex.c Sun Nov 6 06:44:23 2011
</font><font color='#997700'>@@ -46,7 +46,7 @@
</font> if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
<font color='#880000'>- printf ("rtems-rfs: mutex: open failed: %s\n",<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ printf ("rtems-rfs: mutex: open failed: %s\n",
</font> rtems_status_text (sc));
return EIO;
}
<font color='#997700'>@@ -63,7 +63,7 @@
</font> if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
<font color='#880000'>- printf ("rtems-rfs: mutex: close failed: %s\n",<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ printf ("rtems-rfs: mutex: close failed: %s\n",
</font> rtems_status_text (sc));
return EIO;
}
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c:1.6 rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c:1.7
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c:1.6 Sun Nov 6 06:00:04 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c Sun Nov 6 06:44:24 2011
</font><font color='#997700'>@@ -53,9 +53,9 @@
</font> int minor;
rtems_status_code status;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
<font color='#997700'>@@ -74,10 +74,10 @@
</font> }
rtems_rfs_rtems_unlock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
<font color='#997700'>@@ -154,7 +154,7 @@
</font> * @param iop
* @param buffer
* @param count
<font color='#880000'>- * @return ssize_t<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * @return ssize_t
</font> */
static ssize_t
<font color='#997700'>@@ -224,10 +224,10 @@
</font> * @param iop
* @param offset
* @param whence
<font color='#880000'>- * @return off_t<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * @return off_t
</font> */
<font color='#880000'>-static off_t<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+static off_t
</font> rtems_rfs_rtems_device_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c:1.9 rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c:1.10
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c:1.9 Sun Nov 6 06:00:04 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c Sun Nov 6 06:44:24 2011
</font><font color='#997700'>@@ -55,21 +55,21 @@
</font> int rc;
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> iop->offset = 0;
rtems_rfs_inode_close (fs, &inode);
<font color='#997700'>@@ -120,9 +120,9 @@
</font>
count = count / sizeof (struct dirent);
dirent = buffer;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
<font color='#997700'>@@ -131,7 +131,7 @@
</font> }
bytes_transferred = 0;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (d = 0; d < count; d++, dirent++)
{
size_t size;
<font color='#997700'>@@ -152,7 +152,7 @@
</font>
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return bytes_transferred;
}
<font color='#997700'>@@ -171,9 +171,9 @@
</font> * @param iop
* @param offset
* @param whence
<font color='#880000'>- * return off_t<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * return off_t
</font> */
<font color='#880000'>-static off_t<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+static off_t
</font> rtems_rfs_rtems_dir_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
<font color='#997700'>@@ -211,7 +211,7 @@
</font> return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
if (rc)
{
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c:1.12 rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c:1.13
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c:1.12 Sun Nov 6 06:00:04 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c Sun Nov 6 06:44:24 2011
</font><font color='#997700'>@@ -65,9 +65,9 @@
</font> pathname, ino, flags, mode);
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> ino = rtems_rfs_rtems_get_iop_ino (iop);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_file_open (fs, ino, flags, &file);
if (rc > 0)
{
<font color='#997700'>@@ -77,10 +77,10 @@
</font>
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_set_iop_file_handle (iop, file);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (fs);
return 0;
}
<font color='#997700'>@@ -103,11 +103,11 @@
</font> printf("rtems-rfs: file-close: handle:%p\n", file);
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_file_close (fs, file);
if (rc > 0)
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (fs);
return rc;
}
<font color='#997700'>@@ -137,7 +137,7 @@
</font> rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (pos < rtems_rfs_file_size (file))
{
while (count)
<font color='#997700'>@@ -153,10 +153,10 @@
</font>
if (size == 0)
break;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (size > count)
size = count;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> memcpy (data, rtems_rfs_file_data (file), size);
data += size;
<font color='#997700'>@@ -171,9 +171,9 @@
</font> }
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return read;
}
<font color='#997700'>@@ -202,7 +202,7 @@
</font> rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* If the iop position is past the physical end of the file we need to set
* the file size to the new length before writing. If the position equals the
<font color='#997700'>@@ -210,7 +210,7 @@
</font> * from 0. For a specific position we need a file that has a length of one
* more.
*/
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (pos >= rtems_rfs_file_size (file))
{
rc = rtems_rfs_file_set_size (file, pos + 1);
<font color='#997700'>@@ -220,20 +220,20 @@
</font> return rtems_rfs_rtems_error ("file-write: write extend", rc);
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_file_set_bpos (file, pos);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> while (count)
{
size_t size = count;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_file_io_start (file, &size, false);
if (rc)
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
break;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (size > count)
size = count;
<font color='#997700'>@@ -242,7 +242,7 @@
</font> data += size;
count -= size;
write += size;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_file_io_end (file, size, false);
if (rc)
{
<font color='#997700'>@@ -250,11 +250,11 @@
</font> break;
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> iop->size = rtems_rfs_file_size (file);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return write;
}
<font color='#997700'>@@ -280,9 +280,9 @@
</font> * @param iop
* @param offset
* @param whence
<font color='#880000'>- * @return off_t<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * @return off_t
</font> */
<font color='#880000'>-static off_t<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+static off_t
</font> rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
<font color='#997700'>@@ -295,18 +295,18 @@
</font> printf("rtems-rfs: file-lseek: handle:%p offset:%" PRIdoff_t "\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> pos = iop->offset;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_file_seek (file, pos, &pos);
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return iop->offset;
}
<font color='#997700'>@@ -326,15 +326,15 @@
</font>
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%" PRIdoff_t "\n", file, length);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_file_set_size (file, length);
if (rc)
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
iop->size = rtems_rfs_file_size (file);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rc;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-utils.c:1.2 rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-utils.c:1.3
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-utils.c:1.2 Fri Mar 26 23:04:40 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems-utils.c Sun Nov 6 06:44:24 2011
</font><font color='#997700'>@@ -38,7 +38,7 @@
</font> uid = rtems_rfs_inode_get_uid (inode);
gid = rtems_rfs_inode_get_gid (inode);
mode = rtems_rfs_inode_get_mode (inode);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> #if defined (RTEMS_POSIX_API)
st_uid = geteuid ();
st_gid = getegid ();
<font color='#997700'>@@ -46,7 +46,7 @@
</font> st_uid = uid;
st_gid = gid;
#endif
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Check if I am owner or a group member or someone else.
*/
<font color='#997700'>@@ -65,7 +65,7 @@
</font> st_uid, st_gid, uid, gid,
flags, flags_to_test, mode & 0777,
flags_to_test & (mode & 0777));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* If all of the flags are set we have permission
* to do this.
<font color='#997700'>@@ -166,7 +166,7 @@
</font> {
const char* table[] =
{
<font color='#880000'>- "error-msgs",<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ "error-msgs",
</font> "eval-path"
"eval-for-make",
"eval-perms",
<font color='#997700'>@@ -190,7 +190,7 @@
</font> bool set = true;
int arg;
int t;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
<font color='#997700'>@@ -230,7 +230,7 @@
</font> }
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (set)
rtems_rfs_rtems_trace_mask |= value;
else
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.19 rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.20
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.19 Thu Nov 3 01:32:42 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c Sun Nov 6 06:44:24 2011
</font><font color='#997700'>@@ -83,7 +83,7 @@
</font> if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf ("rtems-rfs-rtems: eval-path: in: path:%s pathlen:%zi ino:%" PRId32 "\n",
path, pathlen, ino);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Eat any separators at the start of the path.
*/
<font color='#997700'>@@ -92,7 +92,7 @@
</font> pathlen -= stripped;
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> while (true)
{
/*
<font color='#997700'>@@ -104,7 +104,7 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: opening inode", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Is this the end of the pathname we were given ?
*/
<font color='#997700'>@@ -121,7 +121,7 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: eval perms", EACCES);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Extract the node name we will look for this time around.
*/
<font color='#997700'>@@ -210,7 +210,7 @@
</font> rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return ((errno = rc) == 0) ? 0 : -1;
<font color='#880000'>- }<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ }
</font> if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: down: path:%s ino:%" PRId32 "\n", node, ino);
}
<font color='#997700'>@@ -221,14 +221,14 @@
</font> rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
<font color='#880000'>- }<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ }
</font> }
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
<font color='#997700'>@@ -266,7 +266,7 @@
</font>
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%" PRId32 "\n", path, ino);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> *name = path + strlen (path);
while (*name != path)
<font color='#997700'>@@ -278,7 +278,7 @@
</font> break;
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Eat any separators at start of the path.
*/
<font color='#997700'>@@ -286,7 +286,7 @@
</font> path += stripped;
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> while (true)
{
/*
<font color='#997700'>@@ -298,7 +298,7 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: read ino", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* If a directory the execute bit must be set for us to enter.
*/
<font color='#997700'>@@ -309,13 +309,13 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: eval perms", EACCES);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Is this the end of the pathname we were given ?
*/
if (path == *name)
break;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Extract the node name we will look for this time around.
*/
<font color='#997700'>@@ -349,7 +349,7 @@
</font> }
break;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
<font color='#997700'>@@ -383,7 +383,7 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTSUP);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* We need to find the parent of this node.
*/
<font color='#997700'>@@ -422,7 +422,7 @@
</font> {
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
<font color='#880000'>- }<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ }
</font> }
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
<font color='#997700'>@@ -438,7 +438,7 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: cannot write", EACCES);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Make sure the name does not already exists in the directory.
*/
<font color='#997700'>@@ -457,7 +457,7 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: look up", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Set the parent ino in the path location.
*/
<font color='#997700'>@@ -473,7 +473,7 @@
</font>
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -499,9 +499,9 @@
</font> if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_LINK))
printf ("rtems-rfs-rtems: link: in: parent:%" PRId32 " target:%" PRId32 "\n",
parent, target);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_link (fs, name, strlen (name), parent, target, false);
if (rc)
{
<font color='#997700'>@@ -510,7 +510,7 @@
</font> }
rtems_rfs_rtems_unlock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -533,20 +533,20 @@
</font> int rc;
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_UNLINK))
printf("rtems-rfs-rtems: unlink: parent:%" PRId32 " doff:%" PRIu32 " ino:%" PRId32 "\n",
parent, doff, ino);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("unlink: unlink inode", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -576,7 +576,7 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("node_type: opening inode", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Do not return RTEMS_FILESYSTEM_HARD_LINK because this would result in an
* eval link which does not make sense in the case of the RFS file
<font color='#997700'>@@ -601,9 +601,9 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return type;
}
<font color='#997700'>@@ -629,20 +629,20 @@
</font> uid_t uid;
#endif
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_CHOWN))
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: opening inode", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Verify I am the owner of the node or the super user.
*/
<font color='#997700'>@@ -668,7 +668,7 @@
</font> }
rtems_rfs_rtems_unlock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -693,7 +693,7 @@
</font> int rc;
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
<font color='#997700'>@@ -710,9 +710,9 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("utime: closing inode", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -746,7 +746,7 @@
</font> #endif
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
link_name, strlen (link_name),
uid, gid, parent);
<font color='#997700'>@@ -755,9 +755,9 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("symlink: linking", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -779,12 +779,12 @@
</font> rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
size_t length;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_READLINK))
printf ("rtems-rfs-rtems: readlink: in: ino:%" PRId32 "\n", ino);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_symlink_read (fs, ino, buf, bufsize, &length);
if (rc)
{
<font color='#997700'>@@ -813,9 +813,9 @@
</font> if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FCHMOD))
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
<font color='#997700'>@@ -824,7 +824,7 @@
</font> }
imode = rtems_rfs_inode_get_mode (&inode);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Verify I am the owner of the node or the super user.
*/
<font color='#997700'>@@ -843,16 +843,16 @@
</font> imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
rtems_rfs_inode_set_mode (&inode, imode);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -871,7 +871,7 @@
</font> printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
<font color='#997700'>@@ -880,14 +880,14 @@
</font> }
mode = rtems_rfs_inode_get_mode (&inode);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
{
<font color='#880000'>- buf->st_rdev =<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ buf->st_rdev =
</font> rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> buf->st_dev = rtems_rfs_fs_device (fs);
buf->st_ino = rtems_rfs_inode_ino (&inode);
buf->st_mode = rtems_rfs_rtems_mode (mode);
<font color='#997700'>@@ -925,16 +925,16 @@
</font> else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> buf->st_blksize = rtems_rfs_fs_block_size (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (fs);
return 0;
}
<font color='#997700'>@@ -972,7 +972,7 @@
</font> #endif
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
<font color='#997700'>@@ -988,7 +988,7 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode open", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (S_ISDIR(mode) || S_ISREG(mode))
{
}
<font color='#997700'>@@ -1000,7 +1000,7 @@
</font> rtems_rfs_inode_set_block (&inode, 0, major);
rtems_rfs_inode_set_block (&inode, 1, minor);
}
<font color='#880000'>- else<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ else
</font> {
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
<font color='#997700'>@@ -1013,7 +1013,7 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_rtems_unlock (fs);
return 0;
}
<font color='#997700'>@@ -1023,7 +1023,7 @@
</font> *
* @param parent_pathloc
* @param pathloc
<font color='#880000'>- * @return int<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * @return int
</font> */
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
<font color='#997700'>@@ -1040,7 +1040,7 @@
</font> parent, doff, ino);
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
if (rc)
{
<font color='#997700'>@@ -1057,13 +1057,13 @@
</font> * everything related to this device.
*
* @param iop
<font color='#880000'>- * @return int<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * @return int
</font> */
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
if (rc)
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
<font color='#997700'>@@ -1078,7 +1078,7 @@
</font> * @param old_loc The old name's location.
* @param new_parent_loc The new name's parent location.
* @param new_name The new name.
<font color='#880000'>- * @return int<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ * @return int
</font> */
static int
rtems_rfs_rtems_rename(rtems_filesystem_location_info_t* old_parent_loc,
<font color='#997700'>@@ -1092,7 +1092,7 @@
</font> rtems_rfs_ino ino;
uint32_t doff;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
<font color='#997700'>@@ -1115,7 +1115,7 @@
</font> rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rename: linking", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> /*
* Unlink all inodes even directories with the dir option as false because a
* directory may not be empty.
<font color='#997700'>@@ -1149,7 +1149,7 @@
</font> size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
<font color='#997700'>@@ -1161,7 +1161,7 @@
</font> sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -1262,13 +1262,13 @@
</font> options = NULL;
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems = malloc (sizeof (rtems_rfs_rtems_private));
if (!rtems)
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_mutex_create (&rtems->access);
if (rc > 0)
{
<font color='#997700'>@@ -1283,14 +1283,14 @@
</font> free (rtems);
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
if (rc)
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> mt_entry->fs_info = fs;
mt_entry->mt_fs_root.node_access = (void*) RTEMS_RFS_ROOT_INO;
<font color='#997700'>@@ -1298,7 +1298,7 @@
</font> mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -1313,11 +1313,11 @@
</font> int rc;
rtems = rtems_rfs_fs_user (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_fs_close(fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rtems_rfs_rtems_error ("shutdown: close", rc);
}
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-shell.c:1.11 rtems/cpukit/libfs/src/rfs/rtems-rfs-shell.c:1.12
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-shell.c:1.11 Sun Oct 10 23:34:48 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-shell.c Sun Nov 6 06:44:24 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> {
#if __rtems__
rtems_rfs_rtems_lock (fs);
<font color='#880000'>-#endif<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+#endif
</font> }
/**
<font color='#997700'>@@ -69,7 +69,7 @@
</font> {
#if __rtems__
rtems_rfs_rtems_unlock (fs);
<font color='#880000'>-#endif<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+#endif
</font> }
/**
<font color='#997700'>@@ -108,7 +108,7 @@
</font> rtems_filesystem_freenode (&pathloc);
}
#endif
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return rc;
}
<font color='#997700'>@@ -145,17 +145,17 @@
</font> rtems_rfs_shell_lock_rfs (fs);
rtems_rfs_group_usage (fs, &blocks, &inodes);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_shell_unlock_rfs (fs);
bpcent = (blocks * 1000) / rtems_rfs_fs_blocks (fs);
ipcent = (inodes * 1000) / rtems_rfs_fs_inodes (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> printf (" blocks used: %zd (%d.%d%%)\n",
blocks, bpcent / 10, bpcent % 10);
printf (" inodes used: %zd (%d.%d%%)\n",
inodes, ipcent / 10, ipcent % 10);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -168,7 +168,7 @@
</font> bool state;
int b;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (argc <= 1)
{
printf ("error: no block number provided\n");
<font color='#997700'>@@ -178,7 +178,7 @@
</font> block = strtoul (argv[1], 0, 0);
rtems_rfs_shell_lock_rfs (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
if (rc > 0)
{
<font color='#997700'>@@ -189,7 +189,7 @@
</font> }
printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_open (fs, &buffer);
if (rc > 0)
{
<font color='#997700'>@@ -226,7 +226,7 @@
</font> }
printf ("\n");
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_close (fs, &buffer);
if (rc > 0)
{
<font color='#997700'>@@ -235,9 +235,9 @@
</font> block, rc, strerror (rc));
return 1;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_shell_unlock_rfs (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -309,7 +309,7 @@
</font> }
rtems_rfs_shell_lock_rfs (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (ino = start; ino <= end; ino++)
{
rtems_rfs_inode_handle inode;
<font color='#997700'>@@ -339,7 +339,7 @@
</font> }
error = false;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> mode = rtems_rfs_inode_get_mode (&inode);
if (error_check_only)
<font color='#997700'>@@ -372,11 +372,11 @@
</font> ino, rtems_rfs_buffer_bnum (&inode.buffer),
inode.offset * RTEMS_RFS_INODE_SIZE,
allocated ? 'A' : 'F');
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (!allocated && !forced)
printf (" --\n");
else
<font color='#880000'>- {<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ {
</font> const char* type;
type = "UKN";
if (RTEMS_RFS_S_ISDIR (mode))
<font color='#997700'>@@ -399,7 +399,7 @@
</font> printf ("%" PRIu32 "]\n", rtems_rfs_inode_get_block (&inode, b));
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
<font color='#997700'>@@ -410,9 +410,9 @@
</font> }
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_shell_unlock_rfs (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -426,7 +426,7 @@
</font> int entry;
int b;
int rc;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (argc <= 1)
{
printf ("error: no block number provided\n");
<font color='#997700'>@@ -436,7 +436,7 @@
</font> block = strtoul (argv[1], 0, 0);
rtems_rfs_shell_lock_rfs (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
if (rc > 0)
{
<font color='#997700'>@@ -470,7 +470,7 @@
</font> b = 0;
entry = 1;
data = rtems_rfs_buffer_data (&buffer);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> while (b < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE - 1))
{
rtems_rfs_ino eino;
<font color='#997700'>@@ -480,7 +480,7 @@
</font>
eino = rtems_rfs_dir_entry_ino (data);
elength = rtems_rfs_dir_entry_length (data);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
<font color='#997700'>@@ -490,15 +490,15 @@
</font> printf (" %5d: entry length appears corrupt: %d\n", entry, elength);
break;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> if ((eino < RTEMS_RFS_ROOT_INO) || (eino >= rtems_rfs_fs_inodes (fs)))
{
printf (" %5d: entry ino appears corrupt: ino=%" PRId32 "\n", entry, eino);
break;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
entry, b,
rtems_rfs_dir_entry_ino (data),
<font color='#997700'>@@ -507,7 +507,7 @@
</font>
if (length > 50)
length = 50;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (c = 0; c < length; c++)
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
<font color='#997700'>@@ -518,7 +518,7 @@
</font> data += elength;
entry++;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rc = rtems_rfs_buffer_handle_close (fs, &buffer);
if (rc > 0)
{
<font color='#997700'>@@ -527,9 +527,9 @@
</font> block, rc, strerror (rc));
return 1;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_shell_unlock_rfs (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -565,7 +565,7 @@
</font> printf ("error: group out of range (0->%d).\n", fs->group_count);
return 1;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_shell_lock_rfs (fs);
for (g = start; g <= end; g++)
<font color='#997700'>@@ -580,9 +580,9 @@
</font> blocks, (blocks * 100) / group->size,
inodes, (inodes * 100) / fs->group_inodes);
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> rtems_rfs_shell_unlock_rfs (fs);
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#997700'>@@ -618,7 +618,7 @@
</font>
int arg;
int t;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] != '-')
<font color='#997700'>@@ -653,7 +653,7 @@
</font> printf ("error: command not found: %s\n", argv[arg + 1]);
}
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 1;
}
<font color='#997700'>@@ -675,7 +675,7 @@
</font> case 'v':
config.verbose = true;
break;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> case 's':
arg++;
if (arg >= argc)
<font color='#997700'>@@ -685,7 +685,7 @@
</font> }
config.block_size = strtoul (argv[arg], 0, 0);
break;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> case 'b':
arg++;
if (arg >= argc)
<font color='#997700'>@@ -695,7 +695,7 @@
</font> }
config.group_blocks = strtoul (argv[arg], 0, 0);
break;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> case 'i':
arg++;
if (arg >= argc)
<font color='#997700'>@@ -709,7 +709,7 @@
</font> case 'I':
config.initialise_inodes = true;
break;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> case 'o':
arg++;
if (arg >= argc)
<font color='#997700'>@@ -719,7 +719,7 @@
</font> }
config.inode_overhead = strtoul (argv[arg], 0, 0);
break;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> default:
printf ("error: invalid option: %s\n", argv[arg]);
return 1;
<font color='#997700'>@@ -748,6 +748,6 @@
</font> driver, strerror (errno));
return 1;
}
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> return 0;
}
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-trace.c:1.3 rtems/cpukit/libfs/src/rfs/rtems-rfs-trace.c:1.4
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-trace.c:1.3 Sun Oct 10 23:34:48 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-trace.c Sun Nov 6 06:44:24 2011
</font><font color='#997700'>@@ -100,7 +100,7 @@
</font> bool set = true;
int arg;
int t;
<font color='#880000'>-<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+
</font> for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
</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>