1 /* Function prototypes. */
3 /* Structs used in prototypes must be declared as such first. */
11 _PROTOTYPE( zone_t alloc_zone
, (Dev_t dev
, zone_t z
) );
12 _PROTOTYPE( void buf_pool
, (void) );
13 _PROTOTYPE( void flushall
, (Dev_t dev
) );
14 _PROTOTYPE( void free_zone
, (Dev_t dev
, zone_t numb
) );
15 _PROTOTYPE( struct buf
*get_block
, (Dev_t dev
, block_t block
,int only_search
));
16 _PROTOTYPE( void invalidate
, (Dev_t device
) );
17 _PROTOTYPE( void put_block
, (struct buf
*bp
, int block_type
) );
18 _PROTOTYPE( void set_blocksize
, (int blocksize
) );
19 _PROTOTYPE( void rw_scattered
, (Dev_t dev
,
20 struct buf
**bufq
, int bufqsize
, int rw_flag
) );
23 _PROTOTYPE( int block_dev_io
, (int op
, Dev_t dev
, int proc
, void *buf
,
24 u64_t pos
, int bytes
, int flags
) );
25 _PROTOTYPE( int dev_open
, (endpoint_t driver_e
, Dev_t dev
, int proc
,
27 _PROTOTYPE( void dev_close
, (endpoint_t driver_e
, Dev_t dev
) );
28 _PROTOTYPE( int fs_clone_opcl
, (void) );
29 _PROTOTYPE( int fs_new_driver
, (void) );
32 _PROTOTYPE( struct inode
*alloc_inode
, (dev_t dev
, mode_t bits
) );
33 _PROTOTYPE( void dup_inode
, (struct inode
*ip
) );
34 _PROTOTYPE( struct inode
*find_inode
, (Dev_t dev
, int numb
) );
35 _PROTOTYPE( void free_inode
, (Dev_t dev
, Ino_t numb
) );
36 _PROTOTYPE( int fs_getnode
, (void) );
37 _PROTOTYPE( int fs_putnode
, (void) );
38 _PROTOTYPE( void init_inode_cache
, (void) );
39 _PROTOTYPE( struct inode
*get_inode
, (Dev_t dev
, int 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
) );
43 _PROTOTYPE( void wipe_inode
, (struct inode
*rip
) );
46 _PROTOTYPE( int freesp_inode
, (struct inode
*rip
, off_t st
, off_t end
) );
47 _PROTOTYPE( int fs_ftrunc
, (void) );
48 _PROTOTYPE( int fs_link
, (void) );
49 _PROTOTYPE( int fs_rdlink
, (void) );
50 _PROTOTYPE( int fs_rename
, (void) );
51 _PROTOTYPE( int fs_unlink
, (void) );
52 _PROTOTYPE( int truncate_inode
, (struct inode
*rip
, off_t len
) );
55 _PROTOTYPE( void reply
, (int who
, message
*m_out
) );
58 _PROTOTYPE( int fs_flush
, (void) );
59 _PROTOTYPE( int fs_sync
, (void) );
62 _PROTOTYPE( int fs_mountpoint
, (void) );
63 _PROTOTYPE( int fs_readsuper
, (void) );
64 _PROTOTYPE( int fs_unmount
, (void) );
67 _PROTOTYPE( int fs_create
, (void) );
68 _PROTOTYPE( int fs_inhibread
, (void) );
69 _PROTOTYPE( int fs_mkdir
, (void) );
70 _PROTOTYPE( int fs_mknod
, (void) );
71 _PROTOTYPE( int fs_newnode
, (void) );
72 _PROTOTYPE( int fs_slink
, (void) );
75 _PROTOTYPE( int fs_lookup
, (void) );
76 _PROTOTYPE( struct inode
*advance
, (struct inode
*dirp
,
77 char string
[NAME_MAX
], int chk_perm
) );
78 _PROTOTYPE( int search_dir
, (struct inode
*ldir_ptr
,
79 char string
[NAME_MAX
], ino_t
*numb
, int flag
,
80 int check_permissions
) );
84 _PROTOTYPE( int fs_chmod
, (void) );
85 _PROTOTYPE( int fs_chown
, (void) );
86 _PROTOTYPE( int fs_getdents
, (void) );
87 _PROTOTYPE( int forbidden
, (struct inode
*rip
, mode_t access_desired
) );
88 _PROTOTYPE( int read_only
, (struct inode
*ip
) );
91 _PROTOTYPE( int fs_breadwrite
, (void) );
92 _PROTOTYPE( int fs_readwrite
, (void) );
93 _PROTOTYPE( struct buf
*rahead
, (struct inode
*rip
, block_t baseblock
,
94 u64_t position
, unsigned bytes_ahead
) );
95 _PROTOTYPE( void read_ahead
, (void) );
96 _PROTOTYPE( block_t read_map
, (struct inode
*rip
, off_t pos
) );
97 _PROTOTYPE( int read_write
, (int rw_flag
) );
98 _PROTOTYPE( zone_t rd_indir
, (struct buf
*bp
, int index
) );
101 _PROTOTYPE( int fs_fstatfs
, (void) );
102 _PROTOTYPE( int fs_stat
, (void) );
105 _PROTOTYPE( bit_t alloc_bit
, (struct super_block
*sp
, int map
, bit_t origin
));
106 _PROTOTYPE( void free_bit
, (struct super_block
*sp
, int map
,
107 bit_t bit_returned
) );
108 _PROTOTYPE( int get_block_size
, (dev_t dev
) );
109 _PROTOTYPE( struct super_block
*get_super
, (Dev_t dev
) );
110 _PROTOTYPE( int mounted
, (struct inode
*rip
) );
111 _PROTOTYPE( int read_super
, (struct super_block
*sp
) );
114 _PROTOTYPE( int fs_utime
, (void) );
117 _PROTOTYPE( time_t clock_time
, (void) );
118 _PROTOTYPE( unsigned conv2
, (int norm
, int w
) );
119 _PROTOTYPE( long conv4
, (int norm
, long x
) );
120 _PROTOTYPE( int fetch_name
, (char *path
, int len
, int flag
) );
121 _PROTOTYPE( void mfs_nul_f
, (char *file
, int line
, char *str
, int len
,
123 _PROTOTYPE( int mfs_min_f
, (char *file
, int line
, int len1
, int len2
) );
124 _PROTOTYPE( int no_sys
, (void) );
125 _PROTOTYPE( int isokendpt_f
, (char *f
, int l
, int e
, int *p
, int ft
));
126 _PROTOTYPE( void sanitycheck
, (char *file
, int line
) );
127 #define SANITYCHECK sanitycheck(__FILE__, __LINE__)
130 _PROTOTYPE( void clear_zone
, (struct inode
*rip
, off_t pos
, int flag
) );
131 _PROTOTYPE( struct buf
*new_block
, (struct inode
*rip
, off_t position
) );
132 _PROTOTYPE( void zero_block
, (struct buf
*bp
) );
133 _PROTOTYPE( int write_map
, (struct inode
*, off_t
, zone_t
, int) );