40#if !defined (_RTEMS_RFS_FILE_H_)
41#define _RTEMS_RFS_FILE_H_
118 return shared->
atime;
131 return shared->
mtime;
144 return shared->
ctime;
154static inline uint32_t
167static inline uint16_t
191#define RTEMS_RFS_FILE_NO_ATIME_UPDATE (1 << 0)
194#define RTEMS_RFS_FILE_NO_MTIME_UPDATE (1 << 1)
197#define RTEMS_RFS_FILE_NO_LENGTH_UPDATE (1 << 2)
231#define rtems_rfs_file_data(_f) \
232 (rtems_rfs_buffer_data (&(_f)->buffer) + (_f)->bpos.boff)
237#define rtems_rfs_file_fs(_f) ((_f)->shared->fs)
242#define rtems_rfs_file_inode(_f) (&(_f)->shared->inode)
247#define rtems_rfs_file_map(_f) (&(_f)->shared->map)
252#define rtems_rfs_file_bpos(_f) (&(_f)->bpos)
257#define rtems_rfs_file_block(_f) ((_f)->bpos.bno)
262#define rtems_rfs_file_block_offset(_f) ((_f)->bpos.boff)
267#define rtems_rfs_file_set_bpos(_f, _p) \
268 rtems_rfs_block_get_bpos (rtems_rfs_file_fs (_f), _p, (&(_f)->bpos))
273#define rtems_rfs_file_buffer(_f) (&(_f)->buffer)
278#define rtems_rfs_file_update_atime(_f) \
279 (((_f)->flags & RTEMS_RFS_FILE_NO_ATIME_UPDATE) == 0)
284#define rtems_rfs_file_update_mtime(_f) \
285 (((_f)->flags & RTEMS_RFS_FILE_NO_MTIME_UPDATE) == 0)
290#define rtems_rfs_file_update_length(_f) \
291 (((_f)->flags & RTEMS_RFS_FILE_NO_LENGTH_UPDATE) == 0)
296#define rtems_rfs_file_get_size(_f) \
297 (&(_f)->shared->size)
302#define rtems_rfs_file_size(_f) \
303 rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (_f), (_f)->shared)
308#define rtems_rfs_file_size_count(_f) \
309 rtems_rfs_file_shared_get_block_count ((_f)->shared)
314#define rtems_rfs_file_size_offset(_f) \
315 rtems_rfs_file_shared_get_block_offset ((_f)->shared)
ssize_t read(int fd, void *buffer, size_t count)
Definition: read.c:46
LibIO Internal Interface.
rtems_rfs_pos rtems_rfs_block_get_size(rtems_rfs_file_system *fs, rtems_rfs_block_size *size)
Definition: rtems-rfs-block.c:98
RTEMS File Systems Block Management.
uint64_t rtems_rfs_pos
Definition: rtems-rfs-file-system.h:109
int rtems_rfs_file_set_size(rtems_rfs_file_handle *handle, rtems_rfs_pos size)
Definition: rtems-rfs-file.c:490
struct _rtems_rfs_file_handle rtems_rfs_file_handle
int rtems_rfs_file_io_release(rtems_rfs_file_handle *handle)
Definition: rtems-rfs-file.c:416
rtems_rfs_file_shared * rtems_rfs_file_get_shared(rtems_rfs_file_system *fs, rtems_rfs_ino ino)
Definition: rtems-rfs-file.c:640
int rtems_rfs_file_close(rtems_rfs_file_system *fs, rtems_rfs_file_handle *handle)
Definition: rtems-rfs-file.c:164
int rtems_rfs_file_io_start(rtems_rfs_file_handle *handle, size_t *available, bool read)
Definition: rtems-rfs-file.c:241
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:52
int rtems_rfs_file_seek(rtems_rfs_file_handle *handle, rtems_rfs_pos pos, rtems_rfs_pos *new_pos)
Definition: rtems-rfs-file.c:426
int rtems_rfs_file_io_end(rtems_rfs_file_handle *handle, size_t size, bool read)
Definition: rtems-rfs-file.c:329
struct _rtems_rfs_file_shared rtems_rfs_file_shared
RTEMS File System Information Node.
uint32_t rtems_rfs_time
Definition: rtems-rfs-inode.h:102
uint32_t rtems_rfs_ino
Definition: rtems-rfs-inode.h:97
This structure represents a chain node.
Definition: chain.h:78
Definition: rtems-rfs-file.h:205
int flags
Definition: rtems-rfs-file.h:209
rtems_rfs_block_pos bpos
Definition: rtems-rfs-file.h:219
rtems_rfs_file_shared * shared
Definition: rtems-rfs-file.h:224
rtems_rfs_buffer_handle buffer
Definition: rtems-rfs-file.h:214
Definition: rtems-rfs-file.h:57
rtems_rfs_inode_handle inode
Definition: rtems-rfs-file.h:71
rtems_rfs_file_system * fs
Definition: rtems-rfs-file.h:104
int references
Definition: rtems-rfs-file.h:66
rtems_rfs_block_size size
Definition: rtems-rfs-file.h:83
rtems_rfs_time atime
Definition: rtems-rfs-file.h:88
rtems_rfs_time ctime
Definition: rtems-rfs-file.h:98
rtems_rfs_block_map map
Definition: rtems-rfs-file.h:77
rtems_rfs_time mtime
Definition: rtems-rfs-file.h:93
rtems_chain_node link
Definition: rtems-rfs-file.h:61
Definition: rtems-rfs-file-system.h:135
Definition: rtems-rfs-inode.h:201
Definition: rtems-rfs-block.h:112
Definition: rtems-rfs-block-pos.h:71
Definition: rtems-rfs-block-pos.h:161
rtems_rfs_block_off offset
Definition: rtems-rfs-block-pos.h:172
rtems_rfs_block_no count
Definition: rtems-rfs-block-pos.h:166
Definition: rtems-rfs-buffer.h:111
unsigned size
Definition: tte.h:1