X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/f8bd95b7a13dfe54d800e2d7ecdb0329f0798289..45e1f8b055043e54be35462852ab6649d634da7c:/lunaix-os/kernel/fs/ramfs/ramfs.c diff --git a/lunaix-os/kernel/fs/ramfs/ramfs.c b/lunaix-os/kernel/fs/ramfs/ramfs.c index 37f8869..fece9b3 100644 --- a/lunaix-os/kernel/fs/ramfs/ramfs.c +++ b/lunaix-os/kernel/fs/ramfs/ramfs.c @@ -41,7 +41,7 @@ 'mountibility' for other fs. */ -volatile static inode_t ino = 0; +static volatile inode_t ino = 0; extern const struct v_inode_ops ramfs_inode_ops; extern const struct v_file_ops ramfs_file_ops; @@ -119,8 +119,8 @@ void ramfs_inode_init(struct v_superblock* vsb, struct v_inode* inode) { inode->id = ino++; - inode->ops = &ramfs_inode_ops; - inode->default_fops = &ramfs_file_ops; + inode->ops = (struct v_inode_ops*)&ramfs_inode_ops; + inode->default_fops = (struct v_file_ops*)&ramfs_file_ops; } int @@ -192,8 +192,10 @@ ramfs_unlink(struct v_inode* this) if ((rinode->flags & RAMF_SYMLINK)) { rinode->flags &= ~RAMF_SYMLINK; this->itype &= ~VFS_IFSYMLINK; + vfree(rinode->symlink); - return; + + return 0; } // TODO