change log for rtems (2010-05-15)

rtems-vc at rtems.org rtems-vc at rtems.org
Sat May 15 07:13:42 UTC 2010


 *ccj*:
2010-05-15      Chris Johns <chrisj at rtems.org>

        * libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/imfs.h,
        libfs/src/imfs/imfs_stat.c: PR1419. Return a device for the IMFS.

M 1.2293  cpukit/ChangeLog
M   1.39  cpukit/libfs/src/imfs/imfs.h
M   1.21  cpukit/libfs/src/imfs/imfs_initsupp.c
M   1.14  cpukit/libfs/src/imfs/imfs_stat.c

diff -u rtems/cpukit/ChangeLog:1.2292 rtems/cpukit/ChangeLog:1.2293
--- rtems/cpukit/ChangeLog:1.2292	Thu May 13 22:59:11 2010
+++ rtems/cpukit/ChangeLog	Sat May 15 01:29:55 2010
@@ -1,3 +1,8 @@
+2010-05-15	Chris Johns <chrisj at rtems.org>
+
+	* libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/imfs.h,
+	libfs/src/imfs/imfs_stat.c: PR1419. Return a device for the IMFS.
+
 2010-05-14	Chris Johns <chrisj at rtems.org>
 
 	* libblock/src/flashdisk.c: Clean up on initialisation errors.

diff -u rtems/cpukit/libfs/src/imfs/imfs.h:1.38 rtems/cpukit/libfs/src/imfs/imfs.h:1.39
--- rtems/cpukit/libfs/src/imfs/imfs.h:1.38	Thu Mar  4 00:36:51 2010
+++ rtems/cpukit/libfs/src/imfs/imfs.h	Sat May 15 01:29:55 2010
@@ -156,6 +156,12 @@
 } IMFS_types_union;
 
 /*
+ * Major device number for the IMFS. This is not a real device number because
+ * the IMFS is just a file system and does not have a driver.
+ */
+#define IMFS_DEVICE_MAJOR_NUMBER (0xfffe)
+
+/*
  *  Maximum length of a "basename" of an IMFS file/node.
  */
 
@@ -213,6 +219,7 @@
   } while (0)
 
 typedef struct {
+  int                                     instance;
   ino_t                                   ino_count;
   const rtems_filesystem_file_handlers_r *memfile_handlers;
   const rtems_filesystem_file_handlers_r *directory_handlers;

diff -u rtems/cpukit/libfs/src/imfs/imfs_initsupp.c:1.20 rtems/cpukit/libfs/src/imfs/imfs_initsupp.c:1.21
--- rtems/cpukit/libfs/src/imfs/imfs_initsupp.c:1.20	Tue Jan 19 13:31:00 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_initsupp.c	Sat May 15 01:29:55 2010
@@ -69,6 +69,7 @@
    const rtems_filesystem_file_handlers_r     *directory_handlers
 )
 {
+  static int                             imfs_instance;
   IMFS_fs_info_t                        *fs_info;
   IMFS_jnode_t                          *jnode;
 
@@ -103,6 +104,7 @@
    * Set st_ino for the root to 1.
    */
 
+  fs_info->instance              = imfs_instance++;
   fs_info->ino_count             = 1;
   fs_info->memfile_handlers      = memfile_handlers;
   fs_info->directory_handlers    = directory_handlers;

diff -u rtems/cpukit/libfs/src/imfs/imfs_stat.c:1.13 rtems/cpukit/libfs/src/imfs/imfs_stat.c:1.14
--- rtems/cpukit/libfs/src/imfs/imfs_stat.c:1.13	Thu Jun 11 20:53:33 2009
+++ rtems/cpukit/libfs/src/imfs/imfs_stat.c	Sat May 15 01:29:55 2010
@@ -27,6 +27,7 @@
   struct stat                      *buf
 )
 {
+  IMFS_fs_info_t *fs_info;
   IMFS_jnode_t   *the_jnode;
   IMFS_device_t  *io;
 
@@ -58,6 +59,14 @@
       break;
   }
 
+  /*
+   * The device number of the IMFS is the major number and the minor is the
+   * instance.
+   */
+  fs_info = loc->mt_entry->fs_info;
+  buf->st_dev =
+    rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
+  
   buf->st_mode  = the_jnode->st_mode;
   buf->st_nlink = the_jnode->st_nlink;
   buf->st_ino   = the_jnode->st_ino;



--

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/20100515/44bf00d8/attachment.html>


More information about the vc mailing list