Changeset ca8c50de in rtems


Ignore:
Timestamp:
Jun 17, 2010, 10:00:47 PM (9 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.11, master
Children:
099cdd5
Parents:
f5d429b6
Message:

2010-06-18 Chris Johns <chrisj@…>

  • libfs/src/rfs/rtems-rfs-file-system.h, libfs/src/rfs/rtems-rfs-file-system.c: Move questionable macros to C functions.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rf5d429b6 rca8c50de  
     12010-06-18      Chris Johns <chrisj@rtems.org>
     2
     3        * libfs/src/rfs/rtems-rfs-file-system.h,
     4        libfs/src/rfs/rtems-rfs-file-system.c: Move questionable macros to
     5        C functions.
     6
    172010-06-17      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • cpukit/libfs/src/rfs/rtems-rfs-file-system.c

    rf5d429b6 rca8c50de  
    2828#include <rtems/rfs/rtems-rfs-inode.h>
    2929#include <rtems/rfs/rtems-rfs-trace.h>
     30
     31uint64_t
     32rtems_rfs_fs_size (rtems_rfs_file_system* fs)
     33{
     34  uint64_t blocks = rtems_rfs_fs_blocks (fs);
     35  uint64_t block_size = rtems_rfs_fs_block_size (fs);
     36  return blocks * block_size;
     37}
     38
     39uint64_t
     40rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
     41{
     42  uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
     43  uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
     44  return media_blocks * media_block_size;
     45}
    3046
    3147static int
  • cpukit/libfs/src/rfs/rtems-rfs-file-system.h

    rf5d429b6 rca8c50de  
    305305
    306306/**
    307  * The size of the disk in bytes.
    308  *
    309  * @param _fs Pointer to the file system.
    310  */
    311 #define rtems_rfs_fs_size(_fs) (((uint64_t) rtems_rfs_fs_blocks (_fs)) * \
    312                                 rtems_rfs_fs_block_size (_fs))
    313 
    314 /**
    315307 * The number of inodes.
    316308 *
     
    355347
    356348/**
    357  * The size of the disk in bytes.
    358  *
    359  * @param _fs Pointer to the file system.
    360  */
    361 #define rtems_rfs_fs_media_size(_fs) (((uint64_t) rtems_rfs_fs_media_blocks (_fs)) * \
    362                                       rtems_rfs_fs_media_block_size (_fs))
    363 
    364 /**
    365349 * The maximum length of a name supported by the file system.
    366350 */
     
    378362 */
    379363#define rtems_rfs_fs_user(_fs) ((_fs)->user)
     364
     365/**
     366 * Return the size of the disk in bytes.
     367 *
     368 * @param fs Pointer to the file system.
     369 * @return uint64_t The size of the disk in bytes.
     370 */
     371uint64_t rtems_rfs_fs_size(rtems_rfs_file_system* fs);
     372
     373/**
     374 * The size of the disk in bytes calculated from the media parameters..
     375 *
     376 * @param fs Pointer to the file system.
     377 * @return uint64_t The size of the disk in bytes.
     378 */
     379uint64_t rtems_rfs_fs_media_size (rtems_rfs_file_system* fs);
    380380
    381381/**
Note: See TracChangeset for help on using the changeset viewer.