diff options
author | Chris Johns <chrisj@rtems.org> | 2010-10-11 04:34:48 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2010-10-11 04:34:48 +0000 |
commit | 0a127c5591ec0b3e3c58e84702328e15809605e2 (patch) | |
tree | 0715fe1a84cbd8561d0ee2d1dadbe10dc20cdf14 /cpukit/libfs/src/rfs/rtems-rfs-buffer.h | |
parent | 2010-10-11 Chris Johns <chrisj@rtems.org> (diff) | |
download | rtems-0a127c5591ec0b3e3c58e84702328e15809605e2.tar.bz2 |
2010-10-11 Chris Johns <chrisj@rtems.org>
* libfs/src/rfs/rtems-rfs-trace.c,
libfs/src/rfs/rtems-rfs-trace.h: Add inode-delete.
* libfs/src/rfs/rtems-rfs-shell.c: Fix formatting.
* libfs/src/rfs/rtems-rfs-rtems-dir.c: Use ssize_t. Fix spelling.
* libfs/src/rfs/rtems-rfs-block.c: Fix rtems_rfs_block_get_bpos to
return the position correctly. A bpos does not have any special
processing. Do no reset the buffer handle when shrinking
indirectly.
* libfs/src/rfs/rtems-rfs-inode.c: Add trace.
* libfs/src/rfs/rtems-rfs-format.c: Fix comments.
* libfs/src/rfs/rtems-rfs-group.c: Limit the inodes to the blocks
in a group so the accounting works.
* libfs/src/rfs/rtems-rfs-dir.c: PR 1705. Fix handling the offsets
when deleting an entry.
* libfs/src/rfs/rtems-rfs-buffer.h: Remove
rtems_rfs_buffer_handle_reset. It is not needed and dangerous.
Diffstat (limited to 'cpukit/libfs/src/rfs/rtems-rfs-buffer.h')
-rw-r--r-- | cpukit/libfs/src/rfs/rtems-rfs-buffer.h | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-buffer.h b/cpukit/libfs/src/rfs/rtems-rfs-buffer.h index ccfc0ea887..e207f5c7d3 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-buffer.h +++ b/cpukit/libfs/src/rfs/rtems-rfs-buffer.h @@ -186,22 +186,6 @@ int rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs, rtems_rfs_buffer_handle* handle); /** - * Reset a handle. - * - * @param fs The file system data. - * @param handle The buffer handle to reset. - * @return int The error number (errno). No error if 0. - */ -static inline int -rtems_rfs_buffer_handle_reset (rtems_rfs_buffer_handle* handle) -{ - handle->dirty = false; - handle->bnum = 0; - handle->buffer = NULL; - return 0; -} - -/** * Open a handle. * * @param fs The file system data. @@ -212,7 +196,9 @@ static inline int rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs, rtems_rfs_buffer_handle* handle) { - rtems_rfs_buffer_handle_reset (handle); + handle->dirty = false; + handle->bnum = 0; + handle->buffer = NULL; return 0; } @@ -228,6 +214,9 @@ rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs, rtems_rfs_buffer_handle* handle) { rtems_rfs_buffer_handle_release (fs, handle); + handle->dirty = false; + handle->bnum = 0; + handle->buffer = NULL; return 0; } |