|
ginnOS
The reference: libc, the libraries and the kernel
|
what a kind of file can do. More...
#include </home/runner/work/ginnOS-docs/ginnOS-docs/ginnOS/src/kernel/vfs/file.h>
Data Fields | |
| int32_t(*) | read (file_t *file, void *buf, uint32_t count) |
| int32_t(*) | write (file_t *file, const void *buf, uint32_t count) |
| int64_t(*) | seek (file_t *file, int64_t offset, int whence) |
| int32_t(*) | ioctl (file_t *file, uint32_t request, void *arg) |
| int32_t(*) | mmap (file_t *file, addr_space_t as, uintptr_t virt, size_t length, int prot, uint64_t offset) |
| int32_t(*) | read_entry (file_t *file, fs_dirent_t *entry) |
| int32_t(*) | truncate (file_t *file, uint64_t length) |
| int32_t(*) | stat (file_t *file, struct kstat *st) |
| uint32_t(*) | poll (file_t *file) |
| void(*) | release (file_t *file) |
what a kind of file can do.
a NULL entry means the operation is not supported, and the file_* wrappers return the usual errno for that. every function returns a count or 0 on success, or a negative errno.
| int32_t(*) file_ops_t::mmap(file_t *file, addr_space_t as, uintptr_t virt, size_t length, int prot, uint64_t offset) |
| int32_t(*) file_ops_t::read_entry(file_t *file, fs_dirent_t *entry) |