ext2/vfs: implement read fs call

also implement the cat command!
This commit is contained in:
Michael Shaw 2023-10-21 00:45:38 -04:00
commit ad2de927e2
8 changed files with 128 additions and 9 deletions

View file

@ -84,8 +84,8 @@ struct file_descriptor {
};
struct fs_ops {
int (*read)(struct fs *fs, struct file *file, void *buf, size_t size);
int (*write)(struct fs *fs, struct file *file, void *buf, size_t size);
int (*read)(struct fs *fs, struct file *file, void *buf, size_t offset, size_t size);
int (*write)(struct fs *fs, struct file *file, void *buf, size_t offset, size_t size);
int (*open)(struct fs *fs, struct file *file, const char *path);
int (*close)(struct fs *fs, struct file *file);
int (*seek)(struct fs *fs, struct file *file, size_t offset);