This commit is contained in:
Matheus
2022-10-20 23:24:11 -03:00
parent 3cd7baa390
commit e2ad6e06c7
3 changed files with 54 additions and 9 deletions
+10 -1
View File
@@ -220,8 +220,17 @@ static int tmpfs_readlink(vnode_t *node, char** buff, size_t* linksize){
}
static int tmpfs_link(dirnode_t* parent, char* name, vnode_t* link){
if(!hashtable_insert(&parent->children, name, link))
return ENOMEM;
++link->st.st_nlink;
}
static fscalls_t funcs = {
tmpfs_mount, tmpfs_unmount, tmpfs_open, tmpfs_close, tmpfs_mkdir, tmpfs_create, tmpfs_write, tmpfs_read, tmpfs_getdirent, tmpfs_chmod, tmpfs_mksocket, tmpfs_symlink, tmpfs_readlink
tmpfs_mount, tmpfs_unmount, tmpfs_open, tmpfs_close, tmpfs_mkdir, tmpfs_create, tmpfs_write, tmpfs_read, tmpfs_getdirent, tmpfs_chmod, tmpfs_mksocket, tmpfs_symlink, tmpfs_readlink, tmpfs_link
};