5 void init_dentry(void);
6 struct inode
*lookup_dentry(struct inode
*parent
, char *name
);
7 void add_dentry(struct inode
*parent
, char *name
, struct inode
*ino
);
8 void del_dentry(struct inode
*ino
);
11 int get_handle(struct inode
*ino
);
12 void put_handle(struct inode
*ino
);
15 struct inode
*init_inode(void);
16 struct inode
*find_inode(ino_t ino_nr
);
17 void get_inode(struct inode
*ino
);
18 void put_inode(struct inode
*ino
);
19 void link_inode(struct inode
*parent
, struct inode
*ino
);
20 void unlink_inode(struct inode
*ino
);
21 struct inode
*get_free_inode(void);
22 int have_free_inode(void);
23 int have_used_inode(void);
24 int do_putnode(ino_t ino_nr
, unsigned int count
);
27 int do_create(ino_t dir_nr
, char *name
, mode_t mode
, uid_t uid
, gid_t gid
,
28 struct fsdriver_node
*node
);
29 int do_mkdir(ino_t dir_nr
, char *name
, mode_t mode
, uid_t uid
, gid_t gid
);
30 int do_unlink(ino_t dir_nr
, char *name
, int call
);
31 int do_rmdir(ino_t dir_nr
, char *name
, int call
);
32 int do_rename(ino_t old_dir_nr
, char *old_name
, ino_t new_dir_nr
,
36 int do_lookup(ino_t dir_nr
, char *name
, struct fsdriver_node
*node
,
40 int main(int argc
, char *argv
[]);
43 int do_statvfs(struct statvfs
*statvfs
);
46 int do_mount(dev_t dev
, unsigned int flags
, struct fsdriver_node
*root_node
,
47 unsigned int *res_flags
);
48 void do_unmount(void);
51 void normalize_name(char dst
[NAME_MAX
+1], char *src
);
52 int compare_name(char *name1
, char *name2
);
55 int make_path(char path
[PATH_MAX
], struct inode
*ino
);
56 int push_path(char path
[PATH_MAX
], char *name
);
57 void pop_path(char path
[PATH_MAX
]);
60 ssize_t
do_read(ino_t ino_nr
, struct fsdriver_data
*data
, size_t count
,
62 ssize_t
do_getdents(ino_t ino_nr
, struct fsdriver_data
*data
, size_t bytes
,
66 mode_t
get_mode(struct inode
*ino
, int mode
);
67 int do_stat(ino_t ino_nr
, struct stat
*stat
);
68 int do_chmod(ino_t ino_nr
, mode_t
*mode
);
69 int do_utime(ino_t ino_nr
, struct timespec
*atime
, struct timespec
*mtime
);
72 int verify_path(char *path
, struct inode
*ino
, struct sffs_attr
*attr
,
74 int verify_inode(struct inode
*ino
, char path
[PATH_MAX
],
75 struct sffs_attr
*attr
);
76 int verify_dentry(struct inode
*parent
, char name
[NAME_MAX
+1],
77 char path
[PATH_MAX
], struct inode
**res_ino
);
80 ssize_t
do_write(ino_t ino_nr
, struct fsdriver_data
*data
, size_t count
,
82 int do_trunc(ino_t ino_nr
, off_t start
, off_t end
);
84 #endif /* _SFFS_PROTO_H */