mfs fix by tveerman from trunk.
[minix.git] / servers / mfs / proto.h
blobbfb3bf8e74f27f97d556f4e3d09f5cf9f7e10243
1 #ifndef __MFS_PROTO_H__
2 #define __MFS_PROTO_H__
4 /* Function prototypes. */
6 /* Structs used in prototypes must be declared as such first. */
7 struct buf;
8 struct filp;
9 struct inode;
10 struct super_block;
13 /* cache.c */
14 _PROTOTYPE( zone_t alloc_zone, (dev_t dev, zone_t z) );
15 _PROTOTYPE( void buf_pool, (int bufs) );
16 _PROTOTYPE( void flushall, (dev_t dev) );
17 _PROTOTYPE( void free_zone, (dev_t dev, zone_t numb) );
18 _PROTOTYPE( struct buf *get_block, (dev_t dev, block_t block,int only_search));
19 _PROTOTYPE( void invalidate, (dev_t device) );
20 _PROTOTYPE( void put_block, (struct buf *bp, int block_type) );
21 _PROTOTYPE( void set_blocksize, (unsigned int blocksize) );
22 _PROTOTYPE( void rw_scattered, (dev_t dev,
23 struct buf **bufq, int bufqsize, int rw_flag) );
25 /* device.c */
26 _PROTOTYPE( int block_dev_io, (int op, dev_t dev, endpoint_t proc_e,
27 void *buf, u64_t pos, size_t bytes) );
28 _PROTOTYPE( int dev_open, (endpoint_t driver_e, dev_t dev, endpoint_t proc_e,
29 int flags) );
30 _PROTOTYPE( void dev_close, (endpoint_t driver_e, dev_t dev) );
31 _PROTOTYPE( int fs_new_driver, (void) );
33 /* inode.c */
34 _PROTOTYPE( struct inode *alloc_inode, (dev_t dev, mode_t bits) );
35 _PROTOTYPE( void dup_inode, (struct inode *ip) );
36 _PROTOTYPE( struct inode *find_inode, (dev_t dev, ino_t numb) );
37 _PROTOTYPE( int fs_putnode, (void) );
38 _PROTOTYPE( void init_inode_cache, (void) );
39 _PROTOTYPE( struct inode *get_inode, (dev_t dev, ino_t numb) );
40 _PROTOTYPE( void put_inode, (struct inode *rip) );
41 _PROTOTYPE( void update_times, (struct inode *rip) );
42 _PROTOTYPE( void rw_inode, (struct inode *rip, int rw_flag) );
44 /* link.c */
45 _PROTOTYPE( int fs_ftrunc, (void) );
46 _PROTOTYPE( int fs_link, (void) );
47 _PROTOTYPE( int fs_rdlink, (void) );
48 _PROTOTYPE( int fs_rename, (void) );
49 _PROTOTYPE( int fs_unlink, (void) );
50 _PROTOTYPE( int truncate_inode, (struct inode *rip, off_t len) );
52 /* misc.c */
53 _PROTOTYPE( int fs_flush, (void) );
54 _PROTOTYPE( int fs_sync, (void) );
56 /* mount.c */
57 _PROTOTYPE( int fs_mountpoint, (void) );
58 _PROTOTYPE( int fs_readsuper, (void) );
59 _PROTOTYPE( int fs_unmount, (void) );
61 /* open.c */
62 _PROTOTYPE( int fs_create, (void) );
63 _PROTOTYPE( int fs_inhibread, (void) );
64 _PROTOTYPE( int fs_mkdir, (void) );
65 _PROTOTYPE( int fs_mknod, (void) );
66 _PROTOTYPE( int fs_slink, (void) );
68 /* path.c */
69 _PROTOTYPE( int fs_lookup, (void) );
70 _PROTOTYPE( struct inode *advance, (struct inode *dirp,
71 char string[NAME_MAX], int chk_perm) );
72 _PROTOTYPE( int search_dir, (struct inode *ldir_ptr,
73 char string [NAME_MAX], ino_t *numb, int flag,
74 int check_permissions) );
77 /* protect.c */
78 _PROTOTYPE( int fs_chmod, (void) );
79 _PROTOTYPE( int fs_chown, (void) );
80 _PROTOTYPE( int fs_getdents, (void) );
81 _PROTOTYPE( int forbidden, (struct inode *rip, mode_t access_desired) );
82 _PROTOTYPE( int read_only, (struct inode *ip) );
84 /* read.c */
85 _PROTOTYPE( int fs_breadwrite, (void) );
86 _PROTOTYPE( int fs_readwrite, (void) );
87 _PROTOTYPE( void read_ahead, (void) );
88 _PROTOTYPE( block_t read_map, (struct inode *rip, off_t pos) );
89 _PROTOTYPE( zone_t rd_indir, (struct buf *bp, int index) );
91 /* stadir.c */
92 _PROTOTYPE( int fs_fstatfs, (void) );
93 _PROTOTYPE( int fs_stat, (void) );
95 /* super.c */
96 _PROTOTYPE( bit_t alloc_bit, (struct super_block *sp, int map, bit_t origin));
97 _PROTOTYPE( void free_bit, (struct super_block *sp, int map,
98 bit_t bit_returned) );
99 _PROTOTYPE( unsigned int get_block_size, (dev_t dev) );
100 _PROTOTYPE( struct super_block *get_super, (dev_t dev) );
101 _PROTOTYPE( int read_super, (struct super_block *sp) );
103 /* time.c */
104 _PROTOTYPE( int fs_utime, (void) );
106 /* utility.c */
107 _PROTOTYPE( time_t clock_time, (void) );
108 _PROTOTYPE( unsigned conv2, (int norm, int w) );
109 _PROTOTYPE( long conv4, (int norm, long x) );
110 _PROTOTYPE( void mfs_nul_f, (char *file, int line, char *str, unsigned int len,
111 unsigned int maxlen) );
112 _PROTOTYPE( int min, (unsigned int l, unsigned int r) );
113 _PROTOTYPE( int no_sys, (void) );
114 _PROTOTYPE( void sanitycheck, (char *file, int line) );
115 #define SANITYCHECK sanitycheck(__FILE__, __LINE__)
117 /* write.c */
118 _PROTOTYPE( void clear_zone, (struct inode *rip, off_t pos, int flag) );
119 _PROTOTYPE( struct buf *new_block, (struct inode *rip, off_t position) );
120 _PROTOTYPE( void zero_block, (struct buf *bp) );
121 _PROTOTYPE( int write_map, (struct inode *, off_t, zone_t, int) );
123 #endif