Changeset 8162008 in rtems


Ignore:
Timestamp:
May 15, 2010, 6:29:55 AM (9 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, master
Children:
5dc9c96
Parents:
1783ee4
Message:

2010-05-15 Chris Johns <chrisj@…>

  • libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_stat.c: PR1419. Return a device for the IMFS.
Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r1783ee4 r8162008  
     12010-05-15      Chris Johns <chrisj@rtems.org>
     2
     3        * libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/imfs.h,
     4        libfs/src/imfs/imfs_stat.c: PR1419. Return a device for the IMFS.
     5
    162010-05-14      Chris Johns <chrisj@rtems.org>
    27
  • cpukit/libfs/src/imfs/imfs.h

    r1783ee4 r8162008  
    157157
    158158/*
     159 * Major device number for the IMFS. This is not a real device number because
     160 * the IMFS is just a file system and does not have a driver.
     161 */
     162#define IMFS_DEVICE_MAJOR_NUMBER (0xfffe)
     163
     164/*
    159165 *  Maximum length of a "basename" of an IMFS file/node.
    160166 */
     
    214220
    215221typedef struct {
     222  int                                     instance;
    216223  ino_t                                   ino_count;
    217224  const rtems_filesystem_file_handlers_r *memfile_handlers;
  • cpukit/libfs/src/imfs/imfs_initsupp.c

    r1783ee4 r8162008  
    7070)
    7171{
     72  static int                             imfs_instance;
    7273  IMFS_fs_info_t                        *fs_info;
    7374  IMFS_jnode_t                          *jnode;
     
    104105   */
    105106
     107  fs_info->instance              = imfs_instance++;
    106108  fs_info->ino_count             = 1;
    107109  fs_info->memfile_handlers      = memfile_handlers;
  • cpukit/libfs/src/imfs/imfs_stat.c

    r1783ee4 r8162008  
    2828)
    2929{
     30  IMFS_fs_info_t *fs_info;
    3031  IMFS_jnode_t   *the_jnode;
    3132  IMFS_device_t  *io;
     
    5960  }
    6061
     62  /*
     63   * The device number of the IMFS is the major number and the minor is the
     64   * instance.
     65   */
     66  fs_info = loc->mt_entry->fs_info;
     67  buf->st_dev =
     68    rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
     69 
    6170  buf->st_mode  = the_jnode->st_mode;
    6271  buf->st_nlink = the_jnode->st_nlink;
Note: See TracChangeset for help on using the changeset viewer.