X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/2687264120b44704961375849a51d69b17ce585a..eb1d71eb06e977f9ea61f6f43e5ce65342faf1cc:/lunaix-os/kernel/fs/twifs/twifs.c diff --git a/lunaix-os/kernel/fs/twifs/twifs.c b/lunaix-os/kernel/fs/twifs/twifs.c index 506d604..1f061df 100644 --- a/lunaix-os/kernel/fs/twifs/twifs.c +++ b/lunaix-os/kernel/fs/twifs/twifs.c @@ -19,6 +19,8 @@ static struct twifs_node* fs_root; static struct cake_pile* twi_pile; +static volatile int32_t inode_id = 0; + int __twifs_dirlookup(struct v_inode* inode, struct v_dnode* dnode); @@ -58,6 +60,7 @@ twifs_init() twifs->fs_name = HSTR("twifs", 5); twifs->mount = __twifs_mount; twifs->types = FSTYPE_ROFS; + twifs->fs_id = 0; fsm_register(twifs); @@ -164,7 +167,7 @@ __twifs_mount(struct v_superblock* vsb, struct v_dnode* mount_point) struct v_inode* __twifs_create_inode(struct twifs_node* twi_node) { - struct v_inode* inode = vfs_i_alloc(); + struct v_inode* inode = vfs_i_alloc(1, inode_id++); inode->itype = twi_node->itype; inode->data = twi_node;