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
feat: fstat now handle symbolic link
[lunaix-os.git]
/
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 5cf47eeff413926fbc6ce87c83580fa38b493c6f..c243fcc073ed6607bd0488c0451551ade9430832 100644
(file)
--- a/
lunaix-os/kernel/fs/twifs/twifs.c
+++ b/
lunaix-os/kernel/fs/twifs/twifs.c
@@
-118,7
+118,7
@@
__twifs_dirlookup(struct v_inode* inode, struct v_dnode* dnode)
{
struct twifs_node* twi_node = (struct twifs_node*)inode->data;
{
struct twifs_node* twi_node = (struct twifs_node*)inode->data;
- if (
!(twi_node->itype & VFS_IFDIR
)) {
+ if (
(twi_node->itype & F_FILE
)) {
return ENOTDIR;
}
return ENOTDIR;
}
@@
-180,7
+180,7
@@
__twifs_openfile(struct v_inode* inode, struct v_file* file)
int
twifs_rm_node(struct twifs_node* node)
{
int
twifs_rm_node(struct twifs_node* node)
{
- if (
(node->itype & VFS_IFDIR
) && !llist_empty(&node->children)) {
+ if (
!(node->itype & F_FILE
) && !llist_empty(&node->children)) {
return ENOTEMPTY;
}
llist_delete(&node->siblings);
return ENOTEMPTY;
}
llist_delete(&node->siblings);
@@
-241,6
+241,13
@@
twifs_init()
fs_root = twifs_dir_node(NULL, NULL, 0, 0);
}
fs_root = twifs_dir_node(NULL, NULL, 0, 0);
}
+EXPORT_FILE_SYSTEM(twifs, twifs_init);
+
+void
+twifs_register_plugins()
+{
+ ldga_invoke_fn0(twiplugin_inits);
+}
int
__twifs_twimap_file_read(struct v_inode* inode,
int
__twifs_twimap_file_read(struct v_inode* inode,