tar: use utime() to restore timestamps
[minix.git] / servers / mfs / proto.h
blob403a39780eb77b28a08717007bdf219abb76b2e1
1 #ifndef __MFS_PROTO_H__
2 #define __MFS_PROTO_H__
4 /* Some shortcuts to functions in -lminixfs */
5 #define get_block(d, b, t) lmfs_get_block(d, b, t)
6 #define put_block(b, t) lmfs_put_block(b, t)
8 /* Function prototypes. */
10 /* Structs used in prototypes must be declared as such first. */
11 struct buf;
12 struct filp;
13 struct inode;
14 struct super_block;
17 /* cache.c */
18 zone_t alloc_zone(dev_t dev, zone_t z);
19 void free_zone(dev_t dev, zone_t numb);
21 /* inode.c */
22 struct inode *alloc_inode(dev_t dev, mode_t bits);
23 void dup_inode(struct inode *ip);
24 struct inode *find_inode(dev_t dev, ino_t numb);
25 int fs_putnode(void);
26 void init_inode_cache(void);
27 struct inode *get_inode(dev_t dev, ino_t numb);
28 void put_inode(struct inode *rip);
29 void update_times(struct inode *rip);
30 void rw_inode(struct inode *rip, int rw_flag);
32 /* link.c */
33 int fs_ftrunc(void);
34 int fs_link(void);
35 int fs_rdlink(void);
36 int fs_rename(void);
37 int fs_unlink(void);
38 int truncate_inode(struct inode *rip, off_t len);
40 /* misc.c */
41 int fs_flush(void);
42 int fs_sync(void);
43 int fs_new_driver(void);
45 /* mount.c */
46 int fs_mountpoint(void);
47 int fs_readsuper(void);
48 int fs_unmount(void);
50 /* open.c */
51 int fs_create(void);
52 int fs_inhibread(void);
53 int fs_mkdir(void);
54 int fs_mknod(void);
55 int fs_slink(void);
57 /* path.c */
58 int fs_lookup(void);
59 struct inode *advance(struct inode *dirp, char string[MFS_NAME_MAX], int
60 chk_perm);
61 int search_dir(struct inode *ldir_ptr, char string [MFS_NAME_MAX], ino_t
62 *numb, int flag, int check_permissions);
65 /* protect.c */
66 int fs_chmod(void);
67 int fs_chown(void);
68 int fs_getdents(void);
69 int forbidden(struct inode *rip, mode_t access_desired);
70 int read_only(struct inode *ip);
72 /* read.c */
73 int fs_breadwrite(void);
74 int fs_readwrite(void);
75 void read_ahead(void);
76 block_t read_map(struct inode *rip, off_t pos);
77 zone_t rd_indir(struct buf *bp, int index);
79 /* stadir.c */
80 int fs_fstatfs(void);
81 int fs_stat(void);
82 int fs_statvfs(void);
84 /* super.c */
85 bit_t alloc_bit(struct super_block *sp, int map, bit_t origin);
86 void free_bit(struct super_block *sp, int map, bit_t bit_returned);
87 unsigned int get_block_size(dev_t dev);
88 struct super_block *get_super(dev_t dev);
89 int read_super(struct super_block *sp);
90 int write_super(struct super_block *sp);
92 /* stats.c */
93 bit_t count_free_bits(struct super_block *sp, int map);
95 /* time.c */
96 int fs_utime(void);
98 /* utility.c */
99 time_t clock_time(void);
100 unsigned conv2(int norm, int w);
101 long conv4(int norm, long x);
102 void mfs_nul_f(char *file, int line, char *str, unsigned int len,
103 unsigned int maxlen);
104 int min(unsigned int l, unsigned int r);
105 int no_sys(void);
106 void sanitycheck(char *file, int line);
107 #define SANITYCHECK sanitycheck(__FILE__, __LINE__)
109 /* write.c */
110 void clear_zone(struct inode *rip, off_t pos, int flag);
111 struct buf *new_block(struct inode *rip, off_t position);
112 void zero_block(struct buf *bp);
113 int write_map(struct inode *, off_t, zone_t, int);
115 #endif