21 #if !defined (_RTEMS_RFS_FILE_H_) 22 #define _RTEMS_RFS_FILE_H_ 112 return shared->
mtime;
125 return shared->
ctime;
135 static inline uint32_t
148 static inline uint16_t
172 #define RTEMS_RFS_FILE_NO_ATIME_UPDATE (1 << 0) 175 #define RTEMS_RFS_FILE_NO_MTIME_UPDATE (1 << 1) 178 #define RTEMS_RFS_FILE_NO_LENGTH_UPDATE (1 << 2) 185 typedef struct _rtems_rfs_file_handle 212 #define rtems_rfs_file_data(_f) \ 213 (rtems_rfs_buffer_data (&(_f)->buffer) + (_f)->bpos.boff) 218 #define rtems_rfs_file_fs(_f) ((_f)->shared->fs) 223 #define rtems_rfs_file_inode(_f) (&(_f)->shared->inode) 228 #define rtems_rfs_file_map(_f) (&(_f)->shared->map) 233 #define rtems_rfs_file_bpos(_f) (&(_f)->bpos) 238 #define rtems_rfs_file_block(_f) ((_f)->bpos.bno) 243 #define rtems_rfs_file_block_offset(_f) ((_f)->bpos.boff) 248 #define rtems_rfs_file_set_bpos(_f, _p) \ 249 rtems_rfs_block_get_bpos (rtems_rfs_file_fs (_f), _p, (&(_f)->bpos)) 254 #define rtems_rfs_file_buffer(_f) (&(_f)->buffer) 259 #define rtems_rfs_file_update_atime(_f) \ 260 (((_f)->flags & RTEMS_RFS_FILE_NO_ATIME_UPDATE) == 0) 265 #define rtems_rfs_file_update_mtime(_f) \ 266 (((_f)->flags & RTEMS_RFS_FILE_NO_MTIME_UPDATE) == 0) 271 #define rtems_rfs_file_update_length(_f) \ 272 (((_f)->flags & RTEMS_RFS_FILE_NO_LENGTH_UPDATE) == 0) 277 #define rtems_rfs_file_get_size(_f) \ 278 (&(_f)->shared->size) 283 #define rtems_rfs_file_size(_f) \ 284 rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (_f), (_f)->shared) 289 #define rtems_rfs_file_size_count(_f) \ 290 rtems_rfs_file_shared_get_block_count ((_f)->shared) 295 #define rtems_rfs_file_size_offset(_f) \ 296 rtems_rfs_file_shared_get_block_offset ((_f)->shared)
ssize_t read(int fd, void *buffer, size_t count)
Definition: read.c:27
rtems_chain_node link
Definition: rtems-rfs-file.h:42
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:79
int rtems_rfs_file_io_start(rtems_rfs_file_handle *handle, size_t *available, bool read)
Definition: rtems-rfs-file.c:222
rtems_rfs_time atime
Definition: rtems-rfs-file.h:69
rtems_rfs_file_shared * rtems_rfs_file_get_shared(rtems_rfs_file_system *fs, rtems_rfs_ino ino)
Definition: rtems-rfs-file.c:621
rtems_rfs_time mtime
Definition: rtems-rfs-file.h:74
Definition: rtems-rfs-file-system.h:123
int rtems_rfs_file_set_size(rtems_rfs_file_handle *handle, rtems_rfs_pos size)
Definition: rtems-rfs-file.c:471
uint64_t rtems_rfs_pos
Definition: rtems-rfs-file-system.h:90
int rtems_rfs_file_seek(rtems_rfs_file_handle *handle, rtems_rfs_pos pos, rtems_rfs_pos *new_pos)
Definition: rtems-rfs-file.c:407
uint32_t rtems_rfs_ino
Definition: rtems-rfs-inode.h:78
rtems_rfs_block_map map
Definition: rtems-rfs-file.h:58
rtems_rfs_block_off offset
Definition: rtems-rfs-block-pos.h:153
Definition: rtems-rfs-file.h:37
int rtems_rfs_file_io_release(rtems_rfs_file_handle *handle)
Definition: rtems-rfs-file.c:397
Definition: rtems-rfs-inode.h:181
Definition: rtems-rfs-file.h:191
rtems_rfs_block_size size
Definition: rtems-rfs-file.h:64
Definition: rtems-rfs-block-pos.h:51
RTEMS File System Information Node.
rtems_rfs_block_no count
Definition: rtems-rfs-block-pos.h:147
Definition: rtems-rfs-block.h:92
rtems_rfs_file_system * fs
Definition: rtems-rfs-file.h:85
int rtems_rfs_file_close(rtems_rfs_file_system *fs, rtems_rfs_file_handle *handle)
Definition: rtems-rfs-file.c:145
rtems_rfs_time ctime
Definition: rtems-rfs-file.h:79
LibIO Internal Interface.
RTEMS File Systems Block Management.
rtems_rfs_inode_handle inode
Definition: rtems-rfs-file.h:52
uint32_t rtems_rfs_time
Definition: rtems-rfs-inode.h:83
int rtems_rfs_file_io_end(rtems_rfs_file_handle *handle, size_t size, bool read)
Definition: rtems-rfs-file.c:310
struct _rtems_rfs_file_shared rtems_rfs_file_shared
Definition: rtems-rfs-buffer.h:91
int references
Definition: rtems-rfs-file.h:47
int rtems_rfs_file_open(rtems_rfs_file_system *fs, rtems_rfs_ino ino, int oflag, rtems_rfs_file_handle **handle)
Definition: rtems-rfs-file.c:33
unsigned size
Definition: tte.h:74
struct _rtems_rfs_file_handle rtems_rfs_file_handle