2012-04-09 18:08:26 +02:00
|
|
|
#ifndef _SFFS_PROTO_H
|
|
|
|
#define _SFFS_PROTO_H
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* dentry.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
void init_dentry(void);
|
|
|
|
struct inode *lookup_dentry(struct inode *parent, char *name);
|
|
|
|
void add_dentry(struct inode *parent, char *name, struct inode *ino);
|
|
|
|
void del_dentry(struct inode *ino);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* handle.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int get_handle(struct inode *ino);
|
|
|
|
void put_handle(struct inode *ino);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* inode.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
struct inode *init_inode(void);
|
|
|
|
struct inode *find_inode(ino_t ino_nr);
|
|
|
|
void get_inode(struct inode *ino);
|
|
|
|
void put_inode(struct inode *ino);
|
|
|
|
void link_inode(struct inode *parent, struct inode *ino);
|
|
|
|
void unlink_inode(struct inode *ino);
|
|
|
|
struct inode *get_free_inode(void);
|
|
|
|
int have_free_inode(void);
|
|
|
|
int have_used_inode(void);
|
|
|
|
int do_putnode(void);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* link.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int do_create(void);
|
|
|
|
int do_mkdir(void);
|
|
|
|
int do_unlink(void);
|
|
|
|
int do_rmdir(void);
|
|
|
|
int do_rename(void);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* lookup.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int do_lookup(void);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* main.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int main(int argc, char *argv[]);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* misc.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int do_fstatfs(void);
|
|
|
|
int do_statvfs(void);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* mount.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int do_readsuper(void);
|
|
|
|
int do_unmount(void);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* name.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
void normalize_name(char dst[NAME_MAX+1], char *src);
|
|
|
|
int compare_name(char *name1, char *name2);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* path.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int make_path(char path[PATH_MAX], struct inode *ino);
|
|
|
|
int push_path(char path[PATH_MAX], char *name);
|
|
|
|
void pop_path(char path[PATH_MAX]);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* read.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int do_read(void);
|
|
|
|
int do_getdents(void);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* stat.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
mode_t get_mode(struct inode *ino, int mode);
|
|
|
|
int do_stat(void);
|
|
|
|
int do_chmod(void);
|
|
|
|
int do_utime(void);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* util.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int get_name(cp_grant_id_t grant, size_t len, char name[NAME_MAX+1]);
|
|
|
|
int do_noop(void);
|
|
|
|
int no_sys(void);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* verify.c */
|
2012-04-09 18:08:26 +02:00
|
|
|
int verify_path(char *path, struct inode *ino, struct sffs_attr *attr,
|
2012-03-24 16:16:34 +01:00
|
|
|
int *stale);
|
2012-04-09 18:08:26 +02:00
|
|
|
int verify_inode(struct inode *ino, char path[PATH_MAX],
|
|
|
|
struct sffs_attr *attr);
|
|
|
|
int verify_dentry(struct inode *parent, char name[NAME_MAX+1],
|
|
|
|
char path[PATH_MAX], struct inode **res_ino);
|
2010-01-26 00:18:02 +01:00
|
|
|
|
|
|
|
/* write.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int do_write(void);
|
|
|
|
int do_ftrunc(void);
|
2012-04-09 18:08:26 +02:00
|
|
|
|
|
|
|
#endif /* _SFFS_PROTO_H */
|