change log for rtems (2010-06-17)

rtems-vc at rtems.org rtems-vc at rtems.org
Thu Jun 17 22:12:19 UTC 2010


 *ccj*:
2010-06-18      Chris Johns <chrisj at rtems.org>

        * libfs/src/rfs/rtems-rfs-file-system.h,
        libfs/src/rfs/rtems-rfs-file-system.c: Move questionable macros to
        C functions.

M 1.2422  cpukit/ChangeLog
M    1.7  cpukit/libfs/src/rfs/rtems-rfs-file-system.h
M    1.6  cpukit/libfs/src/rfs/rtems-rfs-file-system.c

diff -u rtems/cpukit/ChangeLog:1.2421 rtems/cpukit/ChangeLog:1.2422
--- rtems/cpukit/ChangeLog:1.2421	Thu Jun 17 13:39:28 2010
+++ rtems/cpukit/ChangeLog	Thu Jun 17 17:00:45 2010
@@ -1,3 +1,9 @@
+2010-06-18	Chris Johns <chrisj at rtems.org>
+
+	* libfs/src/rfs/rtems-rfs-file-system.h,
+	libfs/src/rfs/rtems-rfs-file-system.c: Move questionable macros to
+	C functions.
+
 2010-06-17	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	* sapi/include/confdefs.h: Remove ITRON configuration parameters.

diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h:1.6 rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h:1.7
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h:1.6	Wed Jun 16 22:57:11 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h	Thu Jun 17 17:00:47 2010
@@ -304,14 +304,6 @@
 #define rtems_rfs_fs_block_size(_fs) ((_fs)->block_size)
 
 /**
- * The size of the disk in bytes.
- *
- * @param _fs Pointer to the file system.
- */
-#define rtems_rfs_fs_size(_fs) (((uint64_t) rtems_rfs_fs_blocks (_fs)) * \
-                                rtems_rfs_fs_block_size (_fs))
-
-/**
  * The number of inodes.
  *
  * @param _fs Pointer to the file system.
@@ -354,14 +346,6 @@
 #endif
 
 /**
- * The size of the disk in bytes.
- *
- * @param _fs Pointer to the file system.
- */
-#define rtems_rfs_fs_media_size(_fs) (((uint64_t) rtems_rfs_fs_media_blocks (_fs)) * \
-                                      rtems_rfs_fs_media_block_size (_fs))
-
-/**
  * The maximum length of a name supported by the file system.
  */
 #define rtems_rfs_fs_max_name(_fs) ((_fs)->max_name_length)
@@ -379,6 +363,22 @@
 #define rtems_rfs_fs_user(_fs) ((_fs)->user)
 
 /**
+ * Return the size of the disk in bytes.
+ *
+ * @param fs Pointer to the file system.
+ * @return uint64_t The size of the disk in bytes.
+ */
+uint64_t rtems_rfs_fs_size(rtems_rfs_file_system* fs);
+
+/**
+ * The size of the disk in bytes calculated from the media parameters..
+ *
+ * @param fs Pointer to the file system.
+ * @return uint64_t The size of the disk in bytes.
+ */
+uint64_t rtems_rfs_fs_media_size (rtems_rfs_file_system* fs);
+
+/**
  * Open the file system given a file path.
  *
  * @param name The device to open.

diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.5 rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.6
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.5	Wed Jun 16 22:41:12 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c	Thu Jun 17 17:00:47 2010
@@ -28,6 +28,22 @@
 #include <rtems/rfs/rtems-rfs-inode.h>
 #include <rtems/rfs/rtems-rfs-trace.h>
 
+uint64_t
+rtems_rfs_fs_size (rtems_rfs_file_system* fs)
+{
+  uint64_t blocks = rtems_rfs_fs_blocks (fs);
+  uint64_t block_size = rtems_rfs_fs_block_size (fs);
+  return blocks * block_size;
+}
+
+uint64_t
+rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
+{
+  uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
+  uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
+  return media_blocks * media_block_size;
+}
+
 static int
 rtems_rfs_fs_read_superblock (rtems_rfs_file_system* fs)
 {


 *ccj*:
2010-06-18      Chris Johns <chrisj at rtems.org>

        * libfs/src/rfs/rtems-rfs-file-block.c: Clean up uint64_t maths.

M 1.2423  cpukit/ChangeLog
M    1.6  cpukit/libfs/src/rfs/rtems-rfs-block.c

diff -u rtems/cpukit/ChangeLog:1.2422 rtems/cpukit/ChangeLog:1.2423
--- rtems/cpukit/ChangeLog:1.2422	Thu Jun 17 17:00:45 2010
+++ rtems/cpukit/ChangeLog	Thu Jun 17 17:04:51 2010
@@ -1,5 +1,9 @@
 2010-06-18	Chris Johns <chrisj at rtems.org>
 
+	* libfs/src/rfs/rtems-rfs-file-block.c: Clean up uint64_t maths.
+
+2010-06-18	Chris Johns <chrisj at rtems.org>
+
 	* libfs/src/rfs/rtems-rfs-file-system.h,
 	libfs/src/rfs/rtems-rfs-file-system.c: Move questionable macros to
 	C functions.

diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c:1.5 rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c:1.6
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c:1.5	Tue Jun 15 08:35:28 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c	Thu Jun 17 17:04:51 2010
@@ -88,13 +88,15 @@
                           rtems_rfs_block_size*  size)
 {
   uint32_t offset;
+  uint64_t block_size;
   if (size->count == 0)
     return 0;
   if (size->offset == 0)
     offset = rtems_rfs_fs_block_size (fs);
   else
     offset = size->offset;
-  return (((uint64_t) (size->count - 1)) * rtems_rfs_fs_block_size (fs)) + offset;
+  block_size = rtems_rfs_fs_block_size (fs);
+  return (((uint64_t) (size->count - 1)) * block_size) + offset;
 }
 
 int


 *ccj* (on branch rtems-4-10-branch):
2010-06-18      Chris Johns <chrisj at rtems.org>

        * libfs/src/rfs/rtems-rfs-file-block.c: Clean up uint64_t
        maths.

        * libfs/src/rfs/rtems-rfs-file-system.h,
        libfs/src/rfs/rtems-rfs-file-system.c: Move
        questionable macros to C functions.

M 1.2346.2.38  cpukit/ChangeLog
M 1.4.2.2  cpukit/libfs/src/rfs/rtems-rfs-block.c
M 1.3.2.4  cpukit/libfs/src/rfs/rtems-rfs-file-system.h
M 1.4.2.2  cpukit/libfs/src/rfs/rtems-rfs-file-system.c

diff -u rtems/cpukit/ChangeLog:1.2346.2.37 rtems/cpukit/ChangeLog:1.2346.2.38
--- rtems/cpukit/ChangeLog:1.2346.2.37	Thu Jun 17 13:38:20 2010
+++ rtems/cpukit/ChangeLog	Thu Jun 17 17:10:19 2010
@@ -1,3 +1,12 @@
+2010-06-18	Chris Johns <chrisj at rtems.org>
+
+        * libfs/src/rfs/rtems-rfs-file-block.c: Clean up uint64_t
+	maths.
+
+        * libfs/src/rfs/rtems-rfs-file-system.h,
+        libfs/src/rfs/rtems-rfs-file-system.c: Move
+	questionable macros to C functions.
+
 2010-06-17	Joel Sherrill <joel.sherrilL at OARcorp.com>
 
 	* sapi/include/confdefs.h: Remove RTEMS_COVERAGE conditionals.

diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c:1.4.2.1 rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c:1.4.2.2
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c:1.4.2.1	Tue Jun 15 08:35:52 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-block.c	Thu Jun 17 17:10:20 2010
@@ -88,13 +88,15 @@
                           rtems_rfs_block_size*  size)
 {
   uint32_t offset;
+  uint64_t block_size;
   if (size->count == 0)
     return 0;
   if (size->offset == 0)
     offset = rtems_rfs_fs_block_size (fs);
   else
     offset = size->offset;
-  return (((uint64_t) (size->count - 1)) * rtems_rfs_fs_block_size (fs)) + offset;
+  block_size = rtems_rfs_fs_block_size (fs);
+  return (((uint64_t) (size->count - 1)) * block_size) + offset;
 }
 
 int

diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h:1.3.2.3 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.3	Wed Jun 16 22:57:17 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.h	Thu Jun 17 17:10:20 2010
@@ -304,14 +304,6 @@
 #define rtems_rfs_fs_block_size(_fs) ((_fs)->block_size)
 
 /**
- * The size of the disk in bytes.
- *
- * @param _fs Pointer to the file system.
- */
-#define rtems_rfs_fs_size(_fs) (((uint64_t) rtems_rfs_fs_blocks (_fs)) * \
-                                rtems_rfs_fs_block_size (_fs))
-
-/**
  * The number of inodes.
  *
  * @param _fs Pointer to the file system.
@@ -354,14 +346,6 @@
 #endif
 
 /**
- * The size of the disk in bytes.
- *
- * @param _fs Pointer to the file system.
- */
-#define rtems_rfs_fs_media_size(_fs) (((uint64_t) rtems_rfs_fs_media_blocks (_fs)) * \
-                                      rtems_rfs_fs_media_block_size (_fs))
-
-/**
  * The maximum length of a name supported by the file system.
  */
 #define rtems_rfs_fs_max_name(_fs) ((_fs)->max_name_length)
@@ -379,6 +363,22 @@
 #define rtems_rfs_fs_user(_fs) ((_fs)->user)
 
 /**
+ * Return the size of the disk in bytes.
+ *
+ * @param fs Pointer to the file system.
+ * @return uint64_t The size of the disk in bytes.
+ */
+uint64_t rtems_rfs_fs_size(rtems_rfs_file_system* fs);
+
+/**
+ * The size of the disk in bytes calculated from the media parameters..
+ *
+ * @param fs Pointer to the file system.
+ * @return uint64_t The size of the disk in bytes.
+ */
+uint64_t rtems_rfs_fs_media_size (rtems_rfs_file_system* fs);
+
+/**
  * Open the file system given a file path.
  *
  * @param name The device to open.

diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c:1.4.2.1 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.1	Wed Jun 16 22:41:21 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-file-system.c	Thu Jun 17 17:10:20 2010
@@ -28,6 +28,22 @@
 #include <rtems/rfs/rtems-rfs-inode.h>
 #include <rtems/rfs/rtems-rfs-trace.h>
 
+uint64_t
+rtems_rfs_fs_size (rtems_rfs_file_system* fs)
+{
+  uint64_t blocks = rtems_rfs_fs_blocks (fs);
+  uint64_t block_size = rtems_rfs_fs_block_size (fs);
+  return blocks * block_size;
+}
+
+uint64_t
+rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
+{
+  uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
+  uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
+  return media_blocks * media_block_size;
+}
+
 static int
 rtems_rfs_fs_read_superblock (rtems_rfs_file_system* fs)
 {



--

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/20100617/7fca8a6d/attachment.html>


More information about the vc mailing list