Go to the source code of this file.
|
| struct file * | file_open (struct inode *) |
| |
| struct file * | file_reopen (struct file *) |
| |
| struct file * | file_duplicate (struct file *file) |
| |
| void | file_close (struct file *) |
| |
| struct inode * | file_get_inode (struct file *) |
| |
| off_t | file_read (struct file *, void *, off_t) |
| |
| off_t | file_read_at (struct file *, void *, off_t size, off_t start) |
| |
| off_t | file_write (struct file *, const void *, off_t) |
| |
| off_t | file_write_at (struct file *, const void *, off_t size, off_t start) |
| |
| void | file_deny_write (struct file *) |
| |
| void | file_allow_write (struct file *) |
| |
| void | file_seek (struct file *, off_t) |
| |
| off_t | file_tell (struct file *) |
| |
| off_t | file_length (struct file *) |
| |
◆ file_allow_write()
| void file_allow_write |
( |
struct file * |
file | ) |
|
131 {
136 }
137}
#define ASSERT(CONDITION)
Definition: debug.h:30
void inode_allow_write(struct inode *inode)
Definition: inode.c:303
#define NULL
Definition: stddef.h:4
struct inode * inode
Definition: file.c:8
bool deny_write
Definition: file.c:10
◆ file_close()
| void file_close |
( |
struct file * |
file | ) |
|
53 {
58 }
59}
void file_allow_write(struct file *file)
Definition: file.c:131
void inode_close(struct inode *inode)
Definition: inode.c:150
void free(void *)
Definition: malloc.c:202
◆ file_deny_write()
| void file_deny_write |
( |
struct file * |
file | ) |
|
119 {
124 }
125}
void inode_deny_write(struct inode *inode)
Definition: inode.c:293
◆ file_duplicate()
| struct file * file_duplicate |
( |
struct file * |
file | ) |
|
41 {
43 if (nfile) {
47 }
48 return nfile;
49}
struct file * file_open(struct inode *inode)
Definition: file.c:17
void file_deny_write(struct file *file)
Definition: file.c:119
struct inode * inode_reopen(struct inode *inode)
Definition: inode.c:134
off_t pos
Definition: file.c:9
◆ file_get_inode()
| struct inode * file_get_inode |
( |
struct file * |
file | ) |
|
◆ file_length()
141 {
144}
off_t inode_length(const struct inode *inode)
Definition: inode.c:311
◆ file_open()
| struct file * file_open |
( |
struct inode * |
inode | ) |
|
17 {
24 } else {
28 }
29}
void * calloc(size_t, size_t) __attribute__((malloc))
Definition: malloc.c:149
◆ file_read()
73 {
76 return bytes_read;
77}
off_t inode_read_at(struct inode *inode, void *buffer_, off_t size, off_t offset)
Definition: inode.c:183
uint16_t size
Definition: mmu.h:0
int32_t off_t
Definition: off_t.h:9
◆ file_read_at()
◆ file_reopen()
| struct file * file_reopen |
( |
struct file * |
file | ) |
|
◆ file_seek()
| void file_seek |
( |
struct file * |
file, |
|
|
off_t |
new_pos |
|
) |
| |
◆ file_tell()
◆ file_write()
| off_t file_write |
( |
struct file * |
file, |
|
|
const void * |
buffer, |
|
|
off_t |
size |
|
) |
| |
97 {
100 return bytes_written;
101}
off_t inode_write_at(struct inode *inode, const void *buffer_, off_t size, off_t offset)
Definition: inode.c:234
◆ file_write_at()