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
fix: separate any i/o to sequential device from caching layer
[lunaix-os.git]
/
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 31875ef24fab16856de08bd40bf250ae22d709f8..f2d6b15bf2197eae356b7165c81f93bbb1e30bc9 100644
(file)
--- a/
lunaix-os/includes/lunaix/fs/twifs.h
+++ b/
lunaix-os/includes/lunaix/fs/twifs.h
@@
-11,20
+11,33
@@
struct twifs_node
uint32_t itype;
struct llist_header children;
struct llist_header siblings;
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*
};
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*
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*
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);
int
twifs_rm_node(struct twifs_node* node);