xref: /netbsd-src/sbin/fsck_lfs/kernelops.h (revision 797487255274497f443b61a5d8c401a3103b43ad)
1709a4d5bSpooka #ifndef _LFS_KERNEL_OPS_H_
2709a4d5bSpooka #define _LFS_KERNEL_OPS_H_
3709a4d5bSpooka 
4709a4d5bSpooka #include <sys/types.h>
5709a4d5bSpooka #include <sys/statvfs.h>
6709a4d5bSpooka 
7709a4d5bSpooka #include <fcntl.h>
8709a4d5bSpooka #include <unistd.h>
9709a4d5bSpooka 
10709a4d5bSpooka struct kernelops {
114be22246Spooka 	int (*ko_open)(const char *, int, ...);
12709a4d5bSpooka 	int (*ko_statvfs)(const char *, struct statvfs *, int);
134be22246Spooka 	int (*ko_fcntl)(int, int, ...);
14709a4d5bSpooka 	int (*ko_fhopen)(const void *, size_t, int);
15709a4d5bSpooka 	int (*ko_close)(int);
16709a4d5bSpooka 
17709a4d5bSpooka 	ssize_t (*ko_pread)(int, void *, size_t, off_t);
18709a4d5bSpooka 	ssize_t (*ko_pwrite)(int, const void *, size_t, off_t);
19709a4d5bSpooka };
20fe44f86aSpooka extern const struct kernelops kops;
21709a4d5bSpooka 
22*79748725Smlelstv extern long dev_bsize;
23*79748725Smlelstv 
24709a4d5bSpooka #endif /* _LFS_KERNEL_OPS_H_ */
25