git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
chore: fix almost *ALL* warnings.
[lunaix-os.git]
/
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 37f8869ac6ca3ec322d3f87e4dc4a610adcaa4a3..fece9b3ba503a369445896c781b13d58d1ae1414 100644
(file)
--- a/
lunaix-os/kernel/fs/ramfs/ramfs.c
+++ b/
lunaix-os/kernel/fs/ramfs/ramfs.c
@@
-41,7
+41,7
@@
'mountibility' for other fs.
*/
'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;
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++;
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
}
int
@@
-192,8
+192,10
@@
ramfs_unlink(struct v_inode* this)
if ((rinode->flags & RAMF_SYMLINK)) {
rinode->flags &= ~RAMF_SYMLINK;
this->itype &= ~VFS_IFSYMLINK;
if ((rinode->flags & RAMF_SYMLINK)) {
rinode->flags &= ~RAMF_SYMLINK;
this->itype &= ~VFS_IFSYMLINK;
+
vfree(rinode->symlink);
vfree(rinode->symlink);
- return;
+
+ return 0;
}
// TODO
}
// TODO