xref: /xnu-12377.41.6/bsd/vfs/vfs_support.h (revision bbb1b6f9e71b8cdde6e5cd6f4841f207dee3d828)
1*bbb1b6f9SApple OSS Distributions /*
2*bbb1b6f9SApple OSS Distributions  * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
3*bbb1b6f9SApple OSS Distributions  *
4*bbb1b6f9SApple OSS Distributions  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5*bbb1b6f9SApple OSS Distributions  *
6*bbb1b6f9SApple OSS Distributions  * This file contains Original Code and/or Modifications of Original Code
7*bbb1b6f9SApple OSS Distributions  * as defined in and that are subject to the Apple Public Source License
8*bbb1b6f9SApple OSS Distributions  * Version 2.0 (the 'License'). You may not use this file except in
9*bbb1b6f9SApple OSS Distributions  * compliance with the License. The rights granted to you under the License
10*bbb1b6f9SApple OSS Distributions  * may not be used to create, or enable the creation or redistribution of,
11*bbb1b6f9SApple OSS Distributions  * unlawful or unlicensed copies of an Apple operating system, or to
12*bbb1b6f9SApple OSS Distributions  * circumvent, violate, or enable the circumvention or violation of, any
13*bbb1b6f9SApple OSS Distributions  * terms of an Apple operating system software license agreement.
14*bbb1b6f9SApple OSS Distributions  *
15*bbb1b6f9SApple OSS Distributions  * Please obtain a copy of the License at
16*bbb1b6f9SApple OSS Distributions  * http://www.opensource.apple.com/apsl/ and read it before using this file.
17*bbb1b6f9SApple OSS Distributions  *
18*bbb1b6f9SApple OSS Distributions  * The Original Code and all software distributed under the License are
19*bbb1b6f9SApple OSS Distributions  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20*bbb1b6f9SApple OSS Distributions  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21*bbb1b6f9SApple OSS Distributions  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22*bbb1b6f9SApple OSS Distributions  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23*bbb1b6f9SApple OSS Distributions  * Please see the License for the specific language governing rights and
24*bbb1b6f9SApple OSS Distributions  * limitations under the License.
25*bbb1b6f9SApple OSS Distributions  *
26*bbb1b6f9SApple OSS Distributions  * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27*bbb1b6f9SApple OSS Distributions  */
28*bbb1b6f9SApple OSS Distributions /*
29*bbb1b6f9SApple OSS Distributions  * Copyright (c) 1998 Apple Computer, Inc.  All rights reserved.
30*bbb1b6f9SApple OSS Distributions  *
31*bbb1b6f9SApple OSS Distributions  *  File:  vfs/vfs_support.h
32*bbb1b6f9SApple OSS Distributions  *
33*bbb1b6f9SApple OSS Distributions  *	Prototypes for the default vfs routines. A VFS plugin can use these
34*bbb1b6f9SApple OSS Distributions  *	functions in case it does not want to implement all. These functions
35*bbb1b6f9SApple OSS Distributions  *	take care of releasing locks and free up memory that they are
36*bbb1b6f9SApple OSS Distributions  *	supposed to.
37*bbb1b6f9SApple OSS Distributions  *
38*bbb1b6f9SApple OSS Distributions  * HISTORY
39*bbb1b6f9SApple OSS Distributions  *  18-Aug-1998 Umesh Vaishampayan ([email protected])
40*bbb1b6f9SApple OSS Distributions  *      Created.
41*bbb1b6f9SApple OSS Distributions  */
42*bbb1b6f9SApple OSS Distributions 
43*bbb1b6f9SApple OSS Distributions #ifndef _VFS_VFS_SUPPORT_H_
44*bbb1b6f9SApple OSS Distributions #define _VFS_VFS_SUPPORT_H_
45*bbb1b6f9SApple OSS Distributions 
46*bbb1b6f9SApple OSS Distributions #include <sys/cdefs.h>
47*bbb1b6f9SApple OSS Distributions #include <sys/param.h>
48*bbb1b6f9SApple OSS Distributions #include <sys/systm.h>
49*bbb1b6f9SApple OSS Distributions #include <sys/kernel.h>
50*bbb1b6f9SApple OSS Distributions #include <sys/file.h>
51*bbb1b6f9SApple OSS Distributions #include <sys/stat.h>
52*bbb1b6f9SApple OSS Distributions #include <sys/proc.h>
53*bbb1b6f9SApple OSS Distributions #include <sys/conf.h>
54*bbb1b6f9SApple OSS Distributions #include <sys/mount.h>
55*bbb1b6f9SApple OSS Distributions #include <sys/vnode.h>
56*bbb1b6f9SApple OSS Distributions #include <sys/vnode_if.h>
57*bbb1b6f9SApple OSS Distributions #include <sys/malloc.h>
58*bbb1b6f9SApple OSS Distributions #include <sys/dirent.h>
59*bbb1b6f9SApple OSS Distributions 
60*bbb1b6f9SApple OSS Distributions __BEGIN_DECLS
61*bbb1b6f9SApple OSS Distributions extern int nop_create(struct vnop_create_args *ap);
62*bbb1b6f9SApple OSS Distributions extern int err_create(struct vnop_create_args *ap);
63*bbb1b6f9SApple OSS Distributions 
64*bbb1b6f9SApple OSS Distributions extern int nop_whiteout(struct vnop_whiteout_args *ap);
65*bbb1b6f9SApple OSS Distributions extern int err_whiteout(struct vnop_whiteout_args *ap);
66*bbb1b6f9SApple OSS Distributions 
67*bbb1b6f9SApple OSS Distributions extern int nop_mknod(struct vnop_mknod_args *ap);
68*bbb1b6f9SApple OSS Distributions extern int err_mknod(struct vnop_mknod_args *ap);
69*bbb1b6f9SApple OSS Distributions 
70*bbb1b6f9SApple OSS Distributions extern int nop_open(struct vnop_open_args *ap);
71*bbb1b6f9SApple OSS Distributions extern int err_open(struct vnop_open_args *ap);
72*bbb1b6f9SApple OSS Distributions 
73*bbb1b6f9SApple OSS Distributions extern int nop_close(struct vnop_close_args *ap);
74*bbb1b6f9SApple OSS Distributions extern int err_close(struct vnop_close_args *ap);
75*bbb1b6f9SApple OSS Distributions 
76*bbb1b6f9SApple OSS Distributions extern int nop_access(struct vnop_access_args *ap);
77*bbb1b6f9SApple OSS Distributions extern int err_access(struct vnop_access_args *ap);
78*bbb1b6f9SApple OSS Distributions 
79*bbb1b6f9SApple OSS Distributions extern int nop_getattr(struct vnop_getattr_args *ap);
80*bbb1b6f9SApple OSS Distributions extern int err_getattr(struct vnop_getattr_args *ap);
81*bbb1b6f9SApple OSS Distributions 
82*bbb1b6f9SApple OSS Distributions extern int nop_setattr(struct vnop_setattr_args *ap);
83*bbb1b6f9SApple OSS Distributions extern int err_setattr(struct vnop_setattr_args *ap);
84*bbb1b6f9SApple OSS Distributions 
85*bbb1b6f9SApple OSS Distributions extern int nop_read(struct vnop_read_args *ap);
86*bbb1b6f9SApple OSS Distributions extern int err_read(struct vnop_read_args *ap);
87*bbb1b6f9SApple OSS Distributions 
88*bbb1b6f9SApple OSS Distributions extern int nop_write(struct vnop_write_args *ap);
89*bbb1b6f9SApple OSS Distributions extern int err_write(struct vnop_write_args *ap);
90*bbb1b6f9SApple OSS Distributions 
91*bbb1b6f9SApple OSS Distributions extern int nop_ioctl(struct vnop_ioctl_args *ap);
92*bbb1b6f9SApple OSS Distributions extern int err_ioctl(struct vnop_ioctl_args *ap);
93*bbb1b6f9SApple OSS Distributions 
94*bbb1b6f9SApple OSS Distributions extern int nop_select(struct vnop_select_args *ap);
95*bbb1b6f9SApple OSS Distributions extern int err_select(struct vnop_select_args *ap);
96*bbb1b6f9SApple OSS Distributions 
97*bbb1b6f9SApple OSS Distributions extern int nop_exchange(struct vnop_exchange_args *ap);
98*bbb1b6f9SApple OSS Distributions extern int err_exchange(struct vnop_exchange_args *ap);
99*bbb1b6f9SApple OSS Distributions 
100*bbb1b6f9SApple OSS Distributions extern int nop_revoke(struct vnop_revoke_args *ap);
101*bbb1b6f9SApple OSS Distributions extern int err_revoke(struct vnop_revoke_args *ap);
102*bbb1b6f9SApple OSS Distributions 
103*bbb1b6f9SApple OSS Distributions extern int nop_mmap(struct vnop_mmap_args *ap);
104*bbb1b6f9SApple OSS Distributions extern int err_mmap(struct vnop_mmap_args *ap);
105*bbb1b6f9SApple OSS Distributions 
106*bbb1b6f9SApple OSS Distributions extern int nop_fsync(struct vnop_fsync_args *ap);
107*bbb1b6f9SApple OSS Distributions extern int err_fsync(struct vnop_fsync_args *ap);
108*bbb1b6f9SApple OSS Distributions 
109*bbb1b6f9SApple OSS Distributions extern int nop_remove(struct vnop_remove_args *ap);
110*bbb1b6f9SApple OSS Distributions extern int err_remove(struct vnop_remove_args *ap);
111*bbb1b6f9SApple OSS Distributions 
112*bbb1b6f9SApple OSS Distributions extern int nop_link(struct vnop_link_args *ap);
113*bbb1b6f9SApple OSS Distributions extern int err_link(struct vnop_link_args *ap);
114*bbb1b6f9SApple OSS Distributions 
115*bbb1b6f9SApple OSS Distributions extern int nop_rename(struct vnop_rename_args *ap);
116*bbb1b6f9SApple OSS Distributions extern int err_rename(struct vnop_rename_args *ap);
117*bbb1b6f9SApple OSS Distributions 
118*bbb1b6f9SApple OSS Distributions extern int nop_mkdir(struct vnop_mkdir_args *ap);
119*bbb1b6f9SApple OSS Distributions extern int err_mkdir(struct vnop_mkdir_args *ap);
120*bbb1b6f9SApple OSS Distributions 
121*bbb1b6f9SApple OSS Distributions extern int nop_rmdir(struct vnop_rmdir_args *ap);
122*bbb1b6f9SApple OSS Distributions extern int err_rmdir(struct vnop_rmdir_args *ap);
123*bbb1b6f9SApple OSS Distributions 
124*bbb1b6f9SApple OSS Distributions extern int nop_symlink(struct vnop_symlink_args *ap);
125*bbb1b6f9SApple OSS Distributions extern int err_symlink(struct vnop_symlink_args *ap);
126*bbb1b6f9SApple OSS Distributions 
127*bbb1b6f9SApple OSS Distributions extern int nop_readdir(struct vnop_readdir_args *ap);
128*bbb1b6f9SApple OSS Distributions extern int err_readdir(struct vnop_readdir_args *ap);
129*bbb1b6f9SApple OSS Distributions 
130*bbb1b6f9SApple OSS Distributions extern int nop_readdirattr(struct vnop_readdirattr_args *ap);
131*bbb1b6f9SApple OSS Distributions extern int err_readdirattr(struct vnop_readdirattr_args *ap);
132*bbb1b6f9SApple OSS Distributions 
133*bbb1b6f9SApple OSS Distributions extern int nop_readlink(struct vnop_readlink_args *ap);
134*bbb1b6f9SApple OSS Distributions extern int err_readlink(struct vnop_readlink_args *ap);
135*bbb1b6f9SApple OSS Distributions 
136*bbb1b6f9SApple OSS Distributions extern int nop_inactive(struct vnop_inactive_args *ap);
137*bbb1b6f9SApple OSS Distributions extern int err_inactive(struct vnop_inactive_args *ap);
138*bbb1b6f9SApple OSS Distributions 
139*bbb1b6f9SApple OSS Distributions extern int nop_reclaim(struct vnop_reclaim_args *ap);
140*bbb1b6f9SApple OSS Distributions extern int err_reclaim(struct vnop_reclaim_args *ap);
141*bbb1b6f9SApple OSS Distributions 
142*bbb1b6f9SApple OSS Distributions 
143*bbb1b6f9SApple OSS Distributions extern int nop_strategy(struct vnop_strategy_args *ap);
144*bbb1b6f9SApple OSS Distributions extern int err_strategy(struct vnop_strategy_args *ap);
145*bbb1b6f9SApple OSS Distributions 
146*bbb1b6f9SApple OSS Distributions extern int nop_pathconf(struct vnop_pathconf_args *ap);
147*bbb1b6f9SApple OSS Distributions extern int err_pathconf(struct vnop_pathconf_args *ap);
148*bbb1b6f9SApple OSS Distributions 
149*bbb1b6f9SApple OSS Distributions extern int nop_advlock(struct vnop_advlock_args *ap);
150*bbb1b6f9SApple OSS Distributions extern int err_advlock(struct vnop_advlock_args *ap);
151*bbb1b6f9SApple OSS Distributions 
152*bbb1b6f9SApple OSS Distributions 
153*bbb1b6f9SApple OSS Distributions extern int nop_allocate(struct vnop_allocate_args *ap);
154*bbb1b6f9SApple OSS Distributions extern int err_allocate(struct vnop_allocate_args *ap);
155*bbb1b6f9SApple OSS Distributions 
156*bbb1b6f9SApple OSS Distributions extern int nop_bwrite(struct vnop_bwrite_args *ap);
157*bbb1b6f9SApple OSS Distributions extern int err_bwrite(struct vnop_bwrite_args *ap);
158*bbb1b6f9SApple OSS Distributions 
159*bbb1b6f9SApple OSS Distributions extern int nop_pagein(struct vnop_pagein_args *ap);
160*bbb1b6f9SApple OSS Distributions extern int err_pagein(struct vnop_pagein_args *ap);
161*bbb1b6f9SApple OSS Distributions 
162*bbb1b6f9SApple OSS Distributions extern int nop_pageout(struct vnop_pageout_args *ap);
163*bbb1b6f9SApple OSS Distributions extern int err_pageout(struct vnop_pageout_args *ap);
164*bbb1b6f9SApple OSS Distributions 
165*bbb1b6f9SApple OSS Distributions extern int nop_searchfs(struct vnop_searchfs_args *ap);
166*bbb1b6f9SApple OSS Distributions extern int err_searchfs(struct vnop_searchfs_args *ap);
167*bbb1b6f9SApple OSS Distributions 
168*bbb1b6f9SApple OSS Distributions extern int nop_copyfile(struct vnop_copyfile_args *ap);
169*bbb1b6f9SApple OSS Distributions extern int err_copyfile(struct vnop_copyfile_args *ap);
170*bbb1b6f9SApple OSS Distributions 
171*bbb1b6f9SApple OSS Distributions extern int nop_blktooff(struct vnop_blktooff_args *ap);
172*bbb1b6f9SApple OSS Distributions extern int err_blktooff(struct vnop_blktooff_args *ap);
173*bbb1b6f9SApple OSS Distributions 
174*bbb1b6f9SApple OSS Distributions extern int nop_offtoblk(struct vnop_offtoblk_args *ap);
175*bbb1b6f9SApple OSS Distributions extern int err_offtoblk(struct vnop_offtoblk_args *ap);
176*bbb1b6f9SApple OSS Distributions 
177*bbb1b6f9SApple OSS Distributions extern int nop_blockmap(struct vnop_blockmap_args *ap);
178*bbb1b6f9SApple OSS Distributions extern int err_blockmap(struct vnop_blockmap_args *ap);
179*bbb1b6f9SApple OSS Distributions 
180*bbb1b6f9SApple OSS Distributions extern int nop_monitor(struct vnop_monitor_args *ap);
181*bbb1b6f9SApple OSS Distributions extern int err_monitor(struct vnop_monitor_args *ap);
182*bbb1b6f9SApple OSS Distributions 
183*bbb1b6f9SApple OSS Distributions __END_DECLS
184*bbb1b6f9SApple OSS Distributions 
185*bbb1b6f9SApple OSS Distributions #endif  /* _VFS_VFS_SUPPORT_H_ */
186