syscall: implement write syscall

This commit is contained in:
Michael Shaw 2023-11-22 23:27:39 -05:00
commit 3dda839cdd
12 changed files with 176 additions and 22 deletions

View file

@ -80,7 +80,9 @@ struct file_descriptor {
uint32_t mode;
char *buf;
size_t buf_size;
size_t buf_len;
int (*buf_write)(struct file_descriptor *fdesc, void *buf, size_t count);
int (*buf_read)(struct file_descriptor *fdesc, void *buf, size_t count);
struct fs *fs;
};
@ -126,4 +128,6 @@ char *dirname(char *path);
struct file_descriptor *fd_special();
void fd_special_free(struct file_descriptor *fd);
int stdout_write(struct file_descriptor *fdesc, void *buf, size_t len);
#endif /* _VFS_H_ */