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-rtems-dir.c | |
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-rtems-dir.c')
-rw-r--r-- | cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c index ad7b65298a..e395a353e9 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c @@ -26,6 +26,7 @@ #include <fcntl.h> #include <stdlib.h> #include <stdio.h> +#include <unistd.h> #include <rtems/rfs/rtems-rfs-dir.h> #include <rtems/rfs/rtems-rfs-link.h> @@ -113,7 +114,7 @@ rtems_rfs_rtems_dir_read (rtems_libio_t* iop, rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop); rtems_rfs_inode_handle inode; struct dirent* dirent; - size_t bytes_transfered; + ssize_t bytes_transferred; int d; int rc; @@ -129,7 +130,7 @@ rtems_rfs_rtems_dir_read (rtems_libio_t* iop, return rtems_rfs_rtems_error ("dir_read: read inode", rc); } - bytes_transfered = 0; + bytes_transferred = 0; for (d = 0; d < count; d++, dirent++) { @@ -142,17 +143,17 @@ rtems_rfs_rtems_dir_read (rtems_libio_t* iop, } if (rc > 0) { - bytes_transfered = rtems_rfs_rtems_error ("dir_read: dir read", rc); + bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc); break; } iop->offset += size; - bytes_transfered += sizeof (struct dirent); + bytes_transferred += sizeof (struct dirent); } rtems_rfs_inode_close (fs, &inode); rtems_rfs_rtems_unlock (fs); - return (ssize_t) bytes_transfered; + return bytes_transferred; } /** |