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: a file system mapping for pci devices
[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 f2d6b15bf2197eae356b7165c81f93bbb1e30bc9..563411223d8d5d258110e73b26e7d70024888500 100644
(file)
--- a/
lunaix-os/includes/lunaix/fs/twifs.h
+++ b/
lunaix-os/includes/lunaix/fs/twifs.h
@@
-5,19
+5,23
@@
struct twifs_node
{
struct twifs_node
{
- struct v_inode* inode;
struct hstr name;
struct hstr name;
+ inode_t ino_id;
void* data;
uint32_t itype;
void* data;
uint32_t itype;
+ char name_val[VFS_NAME_MAXLEN];
struct llist_header children;
struct llist_header siblings;
struct
{
struct llist_header children;
struct llist_header siblings;
struct
{
- int (*write)(struct v_
file* fil
e,
+ int (*write)(struct v_
inode* inod
e,
void* buffer,
size_t len,
size_t fpos);
void* buffer,
size_t len,
size_t fpos);
- int (*read)(struct v_file* file, void* buffer, size_t len, size_t fpos);
+ int (*read)(struct v_inode* inode,
+ void* buffer,
+ size_t len,
+ size_t fpos);
} ops;
};
} ops;
};
@@
-25,19
+29,10
@@
void
twifs_init();
struct twifs_node*
twifs_init();
struct twifs_node*
-twifs_file_node(struct twifs_node* parent,
- const char* name,
- int name_len,
- uint32_t itype);
+twifs_file_node(struct twifs_node* parent, const char* fmt, ...);
struct twifs_node*
struct twifs_node*
-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, uint32_t itype);
+twifs_dir_node(struct twifs_node* parent, const char* fmt, ...);
int
twifs_rm_node(struct twifs_node* node);
int
twifs_rm_node(struct twifs_node* node);