vfs: restructure vfs to reduce various errors

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-05 15:55:26 +02:00
commit 0c29f0e517
7 changed files with 220 additions and 253 deletions

View file

@ -45,7 +45,7 @@ struct fs_ops {
struct _fs {
u64 type;
u64 flags;
u64 flags;
size_t block_size;
size_t n_blocks;
@ -58,13 +58,13 @@ struct _fs {
struct fs_ops fs_ops;
};
/* VFS ops */
void vfs_init();
void vfs_init(void);
void vfs_register(struct fs_type *fs);
int vfs_open(const char *abs_path, dirent_t **out);
void vfs_close(dirent_t *dent);
int vfs_creat(dirent_t *parent, const char *name, u64 mode, int flags, dirent_t **out);
int vfs_unlink(dirent_t *parent, const char *name);
int vfs_mount(const char *mount_point, fs_t *fs_to_mount);
ssize_t vfs_write(inode_t *ino, char *buf, size_t size, size_t offset);