Changeset 73bf499 in rtems


Ignore:
Timestamp:
Jun 10, 2014, 8:56:55 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
11947299
Parents:
2ba2743
git-author:
Sebastian Huber <sebastian.huber@…> (06/10/14 08:56:55)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/13/14 14:07:46)
Message:

JFFS2: Add device identifier for the flash device

It is used in combination with the inode number to uniquely identify a
file system node in the system.

Location:
cpukit/libfs/src/jffs2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/jffs2/include/rtems/jffs2.h

    r2ba2743 r73bf499  
    119119 *     .read = flash_read,
    120120 *     .write = flash_write,
    121  *     .erase = flash_erase
     121 *     .erase = flash_erase,
     122 *     .device_identifier = 0xc01dc0fe
    122123 *   }
    123124 * };
     
    266267   */
    267268  rtems_jffs2_flash_destroy destroy;
     269
     270  /**
     271   * @brief The device identifier of the flash device.
     272   *
     273   * It is used in combination with the inode number to uniquely identify a
     274   * file system node in the system.
     275   */
     276  dev_t device_identifier;
    268277};
    269278
  • cpukit/libfs/src/jffs2/src/fs-rtems.c

    r2ba2743 r73bf499  
    406406{
    407407        struct _inode *inode = rtems_jffs2_get_inode_by_location(loc);
    408 
    409         rtems_jffs2_do_lock(inode->i_sb);
    410 
     408        struct super_block *sb = inode->i_sb;
     409        rtems_jffs2_flash_control *fc = sb->s_flash_control;
     410
     411        rtems_jffs2_do_lock(sb);
     412
     413        buf->st_dev = fc->device_identifier;
    411414        buf->st_blksize = PAGE_SIZE;
    412415        buf->st_mode = inode->i_mode;
     
    420423        buf->st_ctime = inode->i_ctime;
    421424
    422         rtems_jffs2_do_unlock(inode->i_sb);
     425        rtems_jffs2_do_unlock(sb);
    423426
    424427        return 0;
Note: See TracChangeset for help on using the changeset viewer.