<!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-03)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>ccj</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-11-03 Chris Johns <chrisj@rtems.org>
PR 1948/filesystem
* libfs/src/rfs/rtems-rfs-file-system.c,
libfs/src/rfs/rtems-rfs-file-system.h,
libfs/src/rfs/rtems-rfs-format.c, libfs/src/rfs/rtems-rfs-rtems.c:
Add support for mount passing an ASCIIZ string containing
configuration options. Remove the hardcoded dir string and
size. Fix comments.
* libblock/src/bdbuf.c: Fix state labels in trace output.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libblock/src/bdbuf.c.diff?r1=text&tr1=1.53&r2=text&tr2=1.54&diff_format=h">M</a></td><td width='1%'>1.54</td><td width='100%'>cpukit/libblock/src/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-file-system.h.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-system.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-system.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-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-format.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-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-rtems.c.diff?r1=text&tr1=1.18&r2=text&tr2=1.19&diff_format=h">M</a></td><td width='1%'>1.19</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-rtems.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/libblock/src/bdbuf.c:1.53 rtems/cpukit/libblock/src/bdbuf.c:1.54
--- rtems/cpukit/libblock/src/bdbuf.c:1.53 Sun Jul 4 09:53:44 2010
+++ rtems/cpukit/libblock/src/bdbuf.c Thu Nov 3 01:32:42 2011
</font><font color='#997700'>@@ -290,7 +290,7 @@
</font> rtems_bdbuf_show_users (const char* where, rtems_bdbuf_buffer* bd)
{
const char* states[] =
<font color='#880000'>- { "EM", "FR", "CH", "AC", "AM", "MD", "SY", "TR" };
</font><font color='#000088'>+ { "FR", "EM", "CH", "AC", "AM", "MD", "SY", "TR" };
</font>
printf ("bdbuf:users: %15s: [%" PRIu32 " (%s)] %td:%td = %" PRIu32 " %s\n",
where,
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h:1.7 rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h:1.8
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h:1.7 Thu Jun 17 17:00:47 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h Thu Nov 3 01:32:42 2011
</font><font color='#997700'>@@ -384,11 +384,14 @@
</font> * @param name The device to open.
* @param fs The file system data filled in by this call.
* @param user A pointer to user data.
<font color='#000088'>+ * @param flags The initial set of user flags for the file system.
+ * @param max_held_buffers The maximum number of buffers the RFS holds.
</font> * @return int The error number (errno). No error if 0.
*/
int rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
<font color='#000088'>+ uint32_t max_held_buffers,
</font> rtems_rfs_file_system** fs);
/**
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.7 rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.8
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.7 Mon Oct 17 08:59:26 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c Thu Nov 3 01:32:42 2011
</font><font color='#997700'>@@ -196,6 +196,7 @@
</font> rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
<font color='#000088'>+ uint32_t max_held_buffers,
</font> rtems_rfs_file_system** fs)
{
#if UNUSED
<font color='#997700'>@@ -226,7 +227,7 @@
</font> rtems_chain_initialize_empty (&(*fs)->release_modified);
rtems_chain_initialize_empty (&(*fs)->file_shares);
<font color='#880000'>- (*fs)->max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
</font><font color='#000088'>+ (*fs)->max_held_buffers = max_held_buffers;
</font> (*fs)->buffers_count = 0;
(*fs)->release_count = 0;
(*fs)->release_modified_count = 0;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c:1.8 rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c:1.9
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c:1.8 Sun Oct 10 23:34:48 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c Thu Nov 3 01:32:42 2011
</font><font color='#997700'>@@ -465,7 +465,9 @@
</font> /*
* External API so returns -1.
*/
<font color='#880000'>- rc = rtems_rfs_fs_open (name, NULL, RTEMS_RFS_FS_FORCE_OPEN, &fs);
</font><font color='#000088'>+ rc = rtems_rfs_fs_open (name, NULL,
+ RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
+ 0, &fs);
</font> if (rc < 0)
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.18 rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.19
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.18 Sun Jul 3 19:31:25 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c Thu Nov 3 01:32:42 2011
</font><font color='#997700'>@@ -106,7 +106,7 @@
</font> }
/*
<font color='#880000'>- * Is this the end of the pathname we where given ?
</font><font color='#000088'>+ * Is this the end of the pathname we were given ?
</font> */
if ((*path == '\0') || (pathlen == 0))
break;
<font color='#997700'>@@ -137,7 +137,7 @@
</font> }
/*
<font color='#880000'>- * Eat any separators at start of the path.
</font><font color='#000088'>+ * Eat any separators at the start of the path.
</font> */
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
<font color='#997700'>@@ -146,7 +146,7 @@
</font>
/*
* If the node is the current directory and there is more path to come move
<font color='#880000'>- * on it else we are at the inode we want.
</font><font color='#000088'>+ * on to it otherwise we are at the inode we want.
</font> */
if (rtems_rfs_current_dir (node))
{
<font color='#997700'>@@ -166,7 +166,8 @@
</font> if (rtems_rfs_parent_dir (node))
{
/*
<font color='#880000'>- * If we are at root inode of the file system we have a crossmount path.
</font><font color='#000088'>+ * If we are at the root inode of the file system we have a crossmount
+ * path.
</font> */
if (ino == RTEMS_RFS_ROOT_INO)
{
<font color='#997700'>@@ -183,7 +184,9 @@
</font> /*
* We need to find the parent of this node.
*/
<font color='#880000'>- rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
</font><font color='#000088'>+ rc = rtems_rfs_dir_lookup_ino (fs, &inode,
+ RTEMS_RFS_PARENT_DIR_STR,
+ RTEMS_RFS_PARENT_DIR_SIZE, &ino, &doff);
</font> if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
<font color='#997700'>@@ -308,7 +311,7 @@
</font> }
/*
<font color='#880000'>- * Is this the end of the pathname we where given ?
</font><font color='#000088'>+ * Is this the end of the pathname we were given ?
</font> */
if (path == *name)
break;
<font color='#997700'>@@ -335,7 +338,7 @@
</font>
/*
* If the node is the current directory and there is more path to come move
<font color='#880000'>- * on it else we are at the inode we want.
</font><font color='#000088'>+ * on to it otherwise we are at the inode we want.
</font> */
if (rtems_rfs_current_dir (node))
{
<font color='#997700'>@@ -384,7 +387,9 @@
</font> /*
* We need to find the parent of this node.
*/
<font color='#880000'>- rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
</font><font color='#000088'>+ rc = rtems_rfs_dir_lookup_ino (fs, &inode,
+ RTEMS_RFS_PARENT_DIR_STR,
+ RTEMS_RFS_PARENT_DIR_SIZE, &ino, &doff);
</font> if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
<font color='#997700'>@@ -1224,8 +1229,40 @@
</font> {
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
<font color='#000088'>+ uint32_t flags = 0;
+ uint32_t max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
+ const char* options = data;
</font> int rc;
<font color='#000088'>+ /*
+ * Parse the options the user specifiies.
+ */
+ while (options)
+ {
+ printf ("options=%s\n", options);
+ if (strncmp (options, "hold-bitmaps",
+ sizeof ("hold-bitmaps") - 1) == 0)
+ flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
+ else if (strncmp (options, "no-local-cache",
+ sizeof ("no-local-cache") - 1) == 0)
+ flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
+ else if (strncmp (options, "max-held-bufs",
+ sizeof ("max-held-bufs") - 1) == 0)
+ {
+ max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
+ }
+ else
+ return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
+
+ options = strchr (options, ',');
+ if (options)
+ {
+ ++options;
+ if (*options == '\0')
+ options = NULL;
+ }
+ }
+<span style="background-color: #FF0000"> </span>
</font> rtems = malloc (sizeof (rtems_rfs_rtems_private));
if (!rtems)
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
<font color='#997700'>@@ -1247,7 +1284,7 @@
</font> return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
}
<font color='#880000'>- rc = rtems_rfs_fs_open (mt_entry->dev, rtems, 0, &fs);
</font><font color='#000088'>+ rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
</font> if (rc)
{
free (rtems);
</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>