X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/003db17f7a36a8098827f40df8fedc087b5a26f6..fac3bbf2b2634f4f15cb33ece3acfa39db1433df:/lunaix-os/includes/lunaix/fs/twifs.h diff --git a/lunaix-os/includes/lunaix/fs/twifs.h b/lunaix-os/includes/lunaix/fs/twifs.h index 8df3ddc..f2d6b15 100644 --- a/lunaix-os/includes/lunaix/fs/twifs.h +++ b/lunaix-os/includes/lunaix/fs/twifs.h @@ -7,22 +7,39 @@ struct twifs_node { struct v_inode* inode; struct hstr name; + void* data; uint32_t itype; struct llist_header children; struct llist_header siblings; - struct v_file_ops fops; + struct + { + int (*write)(struct v_file* file, + void* buffer, + size_t len, + size_t fpos); + int (*read)(struct v_file* file, void* buffer, size_t len, size_t fpos); + } ops; }; void twifs_init(); struct twifs_node* -twifs_file_node(struct twifs_node* parent, const char* name, int name_len); +twifs_file_node(struct twifs_node* parent, + const char* name, + int name_len, + uint32_t itype); struct twifs_node* -twifs_dir_node(struct twifs_node* parent, const char* name, int name_len); +twifs_dir_node(struct twifs_node* parent, + const char* name, + int name_len, + uint32_t itype); struct twifs_node* -twifs_toplevel_node(const char* name, int name_len); +twifs_toplevel_node(const char* name, int name_len, uint32_t itype); + +int +twifs_rm_node(struct twifs_node* node); #endif /* __LUNAIX_TWIFS_H */