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. */
18 zone_t
alloc_zone(dev_t dev
, zone_t z
);
19 void free_zone(dev_t dev
, zone_t numb
);
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
);
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
);
38 int truncate_inode(struct inode
*rip
, off_t len
);
43 int fs_new_driver(void);
46 int fs_mountpoint(void);
47 int fs_readsuper(void);
52 int fs_inhibread(void);
59 struct inode
*advance(struct inode
*dirp
, char string
[MFS_NAME_MAX
], int
61 int search_dir(struct inode
*ldir_ptr
, char string
[MFS_NAME_MAX
], ino_t
62 *numb
, int flag
, int check_permissions
);
68 int fs_getdents(void);
69 int forbidden(struct inode
*rip
, mode_t access_desired
);
70 int read_only(struct inode
*ip
);
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
);
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
);
93 bit_t
count_free_bits(struct super_block
*sp
, int map
);
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
);
106 void sanitycheck(char *file
, int line
);
107 #define SANITYCHECK sanitycheck(__FILE__, __LINE__)
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);