diff options
author | Chris Johns <chrisj@rtems.org> | 2011-03-15 05:02:34 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2011-03-15 05:02:34 +0000 |
commit | d0fcd0b8a660e12e2f99affe198f035cf2cf8256 (patch) | |
tree | f6bc0d4e897c276a21e6ebcd40766e5040c6377a /cpukit/libfs/src/rfs/rtems-rfs-block.h | |
parent | 2011-03-14 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-d0fcd0b8a660e12e2f99affe198f035cf2cf8256.tar.bz2 |
2011-03-15 Chris Johns <chrisj@rtems.org>
PR 1763/shell
* libmisc/shell/hexdump-conv.c: Remove debug hacks.
PR 1757/filesystem
* libfs/src/rfs/rtems-rfs-block-pos.h,
libfs/src/rfs/rtems-rfs-block.h, libfs/src/rfs/rtems-rfs-file.c,
libfs/src/rfs/rtems-rfs-rtems-file.c: Set the file size in
iop-size when a file is open. Fix lseek to end of file then write
for sizes less than half the file system block size.
* libfs/src/rfs/rtems-rfs-rtems-dev.c,
libfs/src/rfs/rtems-rfs-rtems-dir.c,
libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs-rtems.h:
Fix the fstat and fchmod calls due to the change in the iop struct
where pathinfo went away. The node_access field in pathinfo was
overloaded.
Diffstat (limited to 'cpukit/libfs/src/rfs/rtems-rfs-block.h')
-rw-r--r-- | cpukit/libfs/src/rfs/rtems-rfs-block.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-block.h b/cpukit/libfs/src/rfs/rtems-rfs-block.h index 79060f8a4c..e4e3f95830 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-block.h +++ b/cpukit/libfs/src/rfs/rtems-rfs-block.h @@ -163,11 +163,6 @@ typedef struct rtems_rfs_block_map_s #define rtems_rfs_block_map_size_offset(_m) ((_m)->size.offset) /** - * Set the size offset for the map. - */ -#define rtems_rfs_block_map_set_size_offset(_m, _o) ((_m)->size.offset = (_o)) - -/** * Are we at the last block in the map ? */ #define rtems_rfs_block_map_last(_m) \ @@ -196,6 +191,33 @@ typedef struct rtems_rfs_block_map_s #define rtems_rfs_block_map_block_offset(_m) ((_m)->bpos.boff) /** + * Set the size offset for the map. The map is tagged as dirty. + * + * @param map Pointer to the open map to set the offset in. + * @param offset The offset to set in the map's size. + */ +static inline void +rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map, + rtems_rfs_block_off offset) +{ + map->size.offset = offset; + map->dirty = true; +} + +/** + * Set the map's size. The map is tagged as dirty. + * + * @param map Pointer to the open map to set the offset in. + * @param size The size to set in the map's size. + */ +static inline void +rtems_rfs_block_map_set_size (rtems_rfs_block_map* map, + rtems_rfs_block_size* size) +{ + rtems_rfs_block_copy_size (&map->size, size); + map->dirty = true; +} +/** * Open a block map. The block map data in the inode is copied into the * map. The buffer handles are opened. The block position is set to the start * so a seek of offset 0 will return the first block. |