Changeset 95308caf in rtems


Ignore:
Timestamp:
Jan 31, 2015, 8:25:57 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
924cbd4f
Parents:
4c14ace6
git-author:
Sebastian Huber <sebastian.huber@…> (01/31/15 20:25:57)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/04/15 18:31:55)
Message:

IMFS: Use rtems_filesystem_make_dev_t_from_pointer

Location:
cpukit/libfs/src/imfs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/imfs/imfs.h

    r4c14ace6 r95308caf  
    229229
    230230/*
    231  * Major device number for the IMFS. This is not a real device number because
    232  * the IMFS is just a file system and does not have a driver.
    233  */
    234 #define IMFS_DEVICE_MAJOR_NUMBER (0xfffe)
    235 
    236 /**
    237  * @ingroup IMFSGenericNodes
    238  *
    239  * @brief Generic IMFS device major number.
    240  */
    241 #define IMFS_GENERIC_DEVICE_MAJOR_NUMBER (0xfffd)
    242 
    243 /*
    244231 *  Maximum length of a "basename" of an IMFS file/node.
    245232 */
     
    386373
    387374typedef struct {
    388   int instance;
    389375  ino_t ino_count;
    390376  const IMFS_node_control *node_controls [IMFS_TYPE_COUNT];
     
    1009995)
    1010996{
    1011   return rtems_filesystem_make_dev_t(
    1012     IMFS_GENERIC_DEVICE_MAJOR_NUMBER,
    1013     node->st_ino
    1014   );
     997  return rtems_filesystem_make_dev_t_from_pointer( node );
    1015998}
    1016999
  • cpukit/libfs/src/imfs/imfs_initsupp.c

    r4c14ace6 r95308caf  
    6262)
    6363{
    64   static int imfs_instance;
    65 
    6664  int rv = 0;
    6765  IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) );
     
    7068    IMFS_jnode_t *root_node;
    7169
    72     fs_info->instance = imfs_instance++;
    7370    memcpy(
    7471      fs_info->node_controls,
  • cpukit/libfs/src/imfs/imfs_stat.c

    r4c14ace6 r95308caf  
    2929)
    3030{
    31   IMFS_fs_info_t *fs_info = loc->mt_entry->fs_info;
     31  const IMFS_fs_info_t *fs_info = loc->mt_entry->fs_info;
    3232  IMFS_jnode_t *the_jnode = loc->node_access;
    3333
    34   /*
    35    * The device number of the IMFS is the major number and the minor is the
    36    * instance.
    37    */
    38   buf->st_dev =
    39     rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
    40 
     34  buf->st_dev   = rtems_filesystem_make_dev_t_from_pointer( fs_info );
    4135  buf->st_mode  = the_jnode->st_mode;
    4236  buf->st_nlink = the_jnode->st_nlink;
Note: See TracChangeset for help on using the changeset viewer.