change log for rtems (2011-11-03)

rtems-vc at rtems.org rtems-vc at rtems.org
Thu Nov 3 05:10:14 UTC 2011


 *ccj* (on branch rtems-4-10-branch):
2011-11-03      Chris Johns <chrisj at 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.
        * libblock/src/bdbuf.c: Fix state labels in trace output.

M 1.2346.2.104  cpukit/ChangeLog
M 1.52.2.1  cpukit/libblock/src/bdbuf.c
M 1.3.2.5  cpukit/libfs/src/rfs/rtems-rfs-file-system.h
M 1.4.2.3  cpukit/libfs/src/rfs/rtems-rfs-file-system.c
M 1.5.2.4  cpukit/libfs/src/rfs/rtems-rfs-format.c
M 1.9.2.4  cpukit/libfs/src/rfs/rtems-rfs-rtems.c

diff -u rtems/cpukit/ChangeLog:1.2346.2.103 rtems/cpukit/ChangeLog:1.2346.2.104
--- rtems/cpukit/ChangeLog:1.2346.2.103	Sat Oct  8 23:48:18 2011
+++ rtems/cpukit/ChangeLog	Wed Nov  2 23:23:04 2011
@@ -1,3 +1,13 @@
+2011-11-03	Chris Johns <chrisj at 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.
+	* libblock/src/bdbuf.c: Fix state labels in trace output.
+
 2011-10-09	Ralf Corsépius <ralf.corsepius at rtems.org>
 
 	* libmisc/serdbg/serdbg.h (putDebugChar, getDebugChar):

diff -u rtems/cpukit/libblock/src/bdbuf.c:1.52 rtems/cpukit/libblock/src/bdbuf.c:1.52.2.1
--- rtems/cpukit/libblock/src/bdbuf.c:1.52	Mon May 17 21:14:05 2010
+++ rtems/cpukit/libblock/src/bdbuf.c	Wed Nov  2 23:23:07 2011
@@ -291,7 +291,7 @@
 rtems_bdbuf_show_users (const char* where, rtems_bdbuf_buffer* bd)
 {
   const char* states[] =
-    { "EM", "FR", "CH", "AC", "AM", "MD", "SY", "TR" };
+    { "FR", "EM", "CH", "AC", "AM", "MD", "SY", "TR" };
 
   printf ("bdbuf:users: %15s: [%" PRIu32 " (%s)] %td:%td = %" PRIu32 " %s\n",
           where,

diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h:1.3.2.4 rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h:1.3.2.5
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h:1.3.2.4	Thu Jun 17 17:10:20 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h	Wed Nov  2 23:23:07 2011
@@ -384,11 +384,14 @@
  * @param name The device to open.
  * @param fs The file system data filled in by this call.
  * @param user A pointer to user data.
+ * @param flags The initial set of user flags for the file system.
+ * @param max_held_buffers The maximum number of buffers the RFS holds.
  * @return int The error number (errno). No error if 0.
  */
 int rtems_rfs_fs_open (const char*             name,
                        void*                   user,
                        uint32_t                flags,
+                       uint32_t                max_held_buffers,
                        rtems_rfs_file_system** fs);
 
 /**

diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.4.2.2 rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.4.2.3
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.4.2.2	Thu Jun 17 17:10:20 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c	Wed Nov  2 23:23:07 2011
@@ -196,6 +196,7 @@
 rtems_rfs_fs_open (const char*             name,
                    void*                   user,
                    uint32_t                flags,
+                   uint32_t                max_held_buffers,
                    rtems_rfs_file_system** fs)
 {
   rtems_rfs_group*       group;
@@ -224,7 +225,7 @@
   rtems_chain_initialize_empty (&(*fs)->release_modified);
   rtems_chain_initialize_empty (&(*fs)->file_shares);
 
-  (*fs)->max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
+  (*fs)->max_held_buffers = max_held_buffers;
   (*fs)->buffers_count = 0;
   (*fs)->release_count = 0;
   (*fs)->release_modified_count = 0;

diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c:1.5.2.3 rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c:1.5.2.4
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c:1.5.2.3	Mon Oct 11 16:12:48 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-format.c	Wed Nov  2 23:23:07 2011
@@ -465,7 +465,9 @@
   /*
    * External API so returns -1.
    */
-  rc = rtems_rfs_fs_open (name, NULL, RTEMS_RFS_FS_FORCE_OPEN, &fs);
+  rc = rtems_rfs_fs_open (name, NULL,
+                          RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
+                          0, &fs);
   if (rc < 0)
   {
     printf ("rtems-rfs: format: file system open failed: %d: %s\n",

diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.9.2.3 rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.9.2.4
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c:1.9.2.3	Sun Jul  3 19:27:36 2011
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-rtems.c	Wed Nov  2 23:23:07 2011
@@ -1268,8 +1268,40 @@
 {
   rtems_rfs_rtems_private* rtems;
   rtems_rfs_file_system*   fs;
+  uint32_t                 flags = 0;
+  uint32_t                 max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
+  const char*              options = data;
   int                      rc;
 
+  /*
+   * 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;
+    }
+  }
+  
   rtems = malloc (sizeof (rtems_rfs_rtems_private));
   if (!rtems)
     return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
@@ -1291,7 +1323,7 @@
     return rtems_rfs_rtems_error ("initialise: cannot lock access  mutex", rc);
   }
   
-  rc = rtems_rfs_fs_open (mt_entry->dev, rtems, 0, &fs);
+  rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
   if (rc)
   {
     free (rtems);



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20111103/5e972045/attachment.html>


More information about the vc mailing list