29 #if !defined (_RTEMS_RFS_BLOCK_POS_H_) 30 #define _RTEMS_RFS_BLOCK_POS_H_ 78 #define rtems_rfs_block_copy_bpos(_lhs, _rhs) \ 79 do { (_lhs)->bno = (_rhs)->bno; \ 80 (_lhs)->boff = (_rhs)->boff; \ 81 (_lhs)->block = (_rhs)->block; } while (0) 163 #define rtems_rfs_block_copy_size(_lhs, _rhs) \ 164 do { (_lhs)->count = (_rhs)->count; \ 165 (_lhs)->offset = (_rhs)->offset; } while (0) 170 #define rtems_rfs_block_pos_last_block(_p, _s) \ 171 ((((_p)->bno == 0) && ((_s)->count == 0)) || ((_p)->bno == ((_s)->count - 1))) 176 #define rtems_rfs_block_pos_past_end(_p, _s) \ 177 (((_p)->bno && ((_s)->count == 0)) || \ 178 ((_p)->bno >= (_s)->count) || \ 179 (((_p)->bno == ((_s)->count - 1)) && ((_p)->boff > (_s)->offset))) 184 #define rtems_rfs_block_pos_block_past_end(_p, _s) \ 185 (((_p)->bno && ((_s)->count == 0)) || ((_p)->bno >= (_s)->count)) 191 #define rtems_rfs_block_size_get_bpos(_s, _b) \ 192 do { (_b)->bno = (_s)->count; \ 193 (_b)->boff = (_s)->offset; \ 195 if ((_b)->boff) --(_b)->bno; } while (0) 200 #define rtems_rfs_block_size_equal(_lhs, _rhs) \ 201 (((_lhs)->count == (_rhs)->count) && ((_lhs)->offset == (_rhs)->offset)) struct rtems_rfs_block_size_s rtems_rfs_block_size
Definition: rtems-rfs-block-pos.h:141
rtems_rfs_pos rtems_rfs_block_get_size(rtems_rfs_file_system *fs, rtems_rfs_block_size *size)
Definition: rtems-rfs-block.c:78
void rtems_rfs_block_get_block_size(rtems_rfs_file_system *fs, rtems_rfs_pos pos, rtems_rfs_block_size *size)
Definition: rtems-rfs-block.c:64
uint32_t rtems_rfs_inode_block
Definition: rtems-rfs-inode.h:89
struct rtems_rfs_block_pos_s rtems_rfs_block_pos
Definition: rtems-rfs-file-system.h:123
uint64_t rtems_rfs_pos
Definition: rtems-rfs-file-system.h:90
rtems_rfs_inode_block rtems_rfs_block_no
Definition: rtems-rfs-block-pos.h:39
uint32_t rtems_rfs_block_off
Definition: rtems-rfs-block-pos.h:44
rtems_rfs_block_off offset
Definition: rtems-rfs-block-pos.h:153
rtems_rfs_pos rtems_rfs_block_get_pos(rtems_rfs_file_system *fs, rtems_rfs_block_pos *bpos)
Definition: rtems-rfs-block.c:57
rtems_rfs_block_off boff
Definition: rtems-rfs-block-pos.h:62
Definition: rtems-rfs-block-pos.h:51
RTEMS File System Information Node.
rtems_rfs_block_no count
Definition: rtems-rfs-block-pos.h:147
rtems_rfs_block_no block
Definition: rtems-rfs-block-pos.h:68
void rtems_rfs_block_get_bpos(rtems_rfs_file_system *fs, rtems_rfs_pos pos, rtems_rfs_block_pos *bpos)
Definition: rtems-rfs-block.c:48
unsigned size
Definition: tte.h:74
int64_t rtems_rfs_pos_rel
Definition: rtems-rfs-file-system.h:95
rtems_rfs_block_no bno
Definition: rtems-rfs-block-pos.h:57