diff options
author | Chris Johns <chrisj@rtems.org> | 2011-03-15 07:32:39 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2011-03-15 07:32:39 +0000 |
commit | 597624691b9611fc67b0f38b9257cea23287c6c2 (patch) | |
tree | 571390327fe6d3eca805e6568756aa39e3da1bba /cpukit/libfs/src/rfs/rtems-rfs-rtems.h | |
parent | 2011-03-15 Chris Johns <chrisj@rtems.org> (diff) | |
download | rtems-597624691b9611fc67b0f38b9257cea23287c6c2.tar.bz2 |
2011-03-15 Chris Johns <chrisj@rtems.org>
* libfs/src/rfs/rtems-rfs-rtems-file.c,
libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs-rtems.h:
The fix to the removal of file_info from iop was broken. The
node_access field must be the inode number in the RFS because the
file system ops provides no way to tell is a stat call is the
result of stat, fstat, or lstat. The solution is to move the file
handle to node_access_2 which is also shared with doff but these
do not overlap.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libfs/src/rfs/rtems-rfs-rtems.h | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.h b/cpukit/libfs/src/rfs/rtems-rfs-rtems.h index 17b87f5ef8..19f51da31c 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.h +++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.h @@ -191,12 +191,30 @@ typedef struct rtems_rfs_rtems_private * Get the ino from the I/O pointer. * * @param _iop The I/O pointer. - * @return + * @return ino */ #define rtems_rfs_rtems_get_iop_ino(_iop) \ ((intptr_t)(_iop)->pathinfo.node_access) /** + * Get the file handle from the I/O pointer. + * + * @param _iop The I/O pointer. + * @return filehandle The file handle + */ +#define rtems_rfs_rtems_get_iop_file_handle(_iop) \ + ((rtems_rfs_file_handle*)(_iop)->pathinfo.node_access_2) + +/** + * Set the file handle in the I/O pointer. + * + * @param _iop The I/O pointer. + * @param _fh The file handle. + */ +#define rtems_rfs_rtems_set_iop_file_handle(_iop, _fh) \ + (_iop)->pathinfo.node_access_2 = (_fh) + +/** * Create the name of the handler's table given the type of handlers. * * @param _h The name of the handlers. @@ -274,18 +292,6 @@ extern const rtems_filesystem_file_handlers_r rtems_rfs_rtems_file_handlers; /** * The following routine does a stat on a node. * - * @param fs The file system data. - * @param inode The inode to stat held in memory. - * @param buf The stat buffer to fill. - * @return int The result code. - */ -int rtems_rfs_rtems_stat_inode (rtems_rfs_file_system* fs, - rtems_rfs_inode_handle* inode, - struct stat* buf); - -/** - * The following routine does a stat on a node. - * * @param iop * @param buf * @return int @@ -294,18 +300,6 @@ int rtems_rfs_rtems_fstat (rtems_filesystem_location_info_t* pathloc, struct stat* buf); /** - * File change mode routine changes an inode. - * - * @param fs The file system data. - * @param inode The inode to change held in memory. - * @param buf The new mode. - * @return int The result code. - */ -int rtems_rfs_rtems_fchmod_inode (rtems_rfs_file_system* fs, - rtems_rfs_inode_handle* inode, - mode_t mode); - -/** * File change mode routine. * * @param iop |