vfs: fix various logical errors in the vfs
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
ab15b88cd6
commit
eb41b17fea
6 changed files with 146 additions and 45 deletions
|
|
@ -88,6 +88,7 @@ void dirent_free(dirent_t *dirent);
|
|||
|
||||
/* inode ops */
|
||||
int inode_find_dirent(inode_t *inode, const char *name, dirent_t **out);
|
||||
int inode_find_dirent_locked(inode_t *inode, const char *name, dirent_t **out);
|
||||
inode_t *inode_create();
|
||||
void inode_free(inode_t *inode);
|
||||
void inode_inc_ref(inode_t *inode);
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ 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_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);
|
||||
ssize_t vfs_read(inode_t *ino, char *buf, size_t size, size_t offset);
|
||||
|
|
|
|||
Loading…
Reference in a new issue