1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58#include <sys/param.h>
59#include <sys/systm.h>
60#include <sys/mount_internal.h>
61#include <sys/vnode_internal.h>
62
63
64
65
66struct mount *rootfs;
67struct vnode *rootvnode;
68int (*mountroot)() = NULL;
69
70
71
72
73extern struct vfsops ufs_vfsops;
74#if FFS
75extern int ffs_mountroot();
76#endif
77extern struct vfsops mfs_vfsops;
78extern int mfs_mountroot();
79extern struct vfsops hfs_vfsops;
80extern int hfs_mountroot();
81extern struct vfsops volfs_vfsops;
82extern struct vfsops cd9660_vfsops;
83extern int cd9660_mountroot();
84extern struct vfsops nfs_vfsops;
85extern int nfs_mountroot();
86extern struct vfsops afs_vfsops;
87extern struct vfsops null_vfsops;
88extern struct vfsops union_vfsops;
89extern struct vfsops fdesc_vfsops;
90extern struct vfsops devfs_vfsops;
91
92
93
94
95static struct vfstable vfsconflist[] = {
96
97#if HFS
98 { &hfs_vfsops, "hfs", 17, 0, MNT_LOCAL | MNT_DOVOLFS, hfs_mountroot, NULL, 0, {0}, VFC_VFSLOCALARGS, 0, 0 },
99#endif
100
101
102#if FFS
103 { &ufs_vfsops, "ufs", 1, 0, MNT_LOCAL, ffs_mountroot, NULL, 0, {0}, VFC_VFSLOCALARGS, 0, 0 },
104#endif
105
106
107#if CD9660
108 { &cd9660_vfsops, "cd9660", 14, 0, MNT_LOCAL, cd9660_mountroot, NULL, 0, {0}, VFC_VFSLOCALARGS, 0, 0 },
109#endif
110
111
112#if MFS
113 { &mfs_vfsops, "mfs", 3, 0, MNT_LOCAL, mfs_mountroot, NULL, 0, {0}, VFC_VFSGENERICARGS , 0, 0},
114#endif
115
116
117#if NFSCLIENT
118 { &nfs_vfsops, "nfs", 2, 0, 0, nfs_mountroot, NULL, 0, {0}, VFC_VFSGENERICARGS , 0, 0},
119#endif
120
121
122#if AFS
123 { &afs_vfsops, "andrewfs", 13, 0, 0, afs_mountroot, NULL, 0, {0}, VFC_VFSGENERICARGS , 0, 0},
124#endif
125
126
127#if NULLFS
128 { &null_vfsops, "loopback", 9, 0, 0, NULL, NULL, 0, {0}, VFC_VFSGENERICARGS , 0, 0},
129#endif
130
131
132#if UNION
133 { &union_vfsops, "union", 15, 0, 0, NULL, NULL, 0, {0}, VFC_VFSGENERICARGS , 0, 0},
134#endif
135
136
137#if FDESC
138 { &fdesc_vfsops, "fdesc", 7, 0, 0, NULL, NULL, 0, {0}, VFC_VFSGENERICARGS , 0, 0},
139#endif
140
141
142#if VOLFS
143 { &volfs_vfsops, "volfs", 18, 0, 0, NULL, NULL, 0, {0}, VFC_VFSGENERICARGS , 0, 0},
144#endif
145
146
147#if DEVFS
148 { &devfs_vfsops, "devfs", 19, 0, 0, NULL, NULL, 0, {0}, VFC_VFSGENERICARGS , 0, 0},
149#endif
150
151 {0},
152 {0},
153 {0},
154 {0},
155 {0},
156 {0},
157 {0},
158 {0},
159 {0},
160 {0},
161 {0},
162 {0},
163 {0},
164 {0}
165};
166
167
168
169
170
171int maxvfsslots = sizeof(vfsconflist) / sizeof (struct vfsconf);
172int numused_vfsslots = 0;
173int maxvfsconf = sizeof(vfsconflist) / sizeof (struct vfsconf);
174struct vfstable *vfsconf = vfsconflist;
175
176
177
178
179
180
181
182
183#if FFS
184extern struct vnodeopv_desc ffs_vnodeop_opv_desc;
185extern struct vnodeopv_desc ffs_specop_opv_desc;
186extern struct vnodeopv_desc ffs_fifoop_opv_desc;
187#endif
188extern struct vnodeopv_desc mfs_vnodeop_opv_desc;
189extern struct vnodeopv_desc dead_vnodeop_opv_desc;
190extern struct vnodeopv_desc fifo_vnodeop_opv_desc;
191extern struct vnodeopv_desc spec_vnodeop_opv_desc;
192extern struct vnodeopv_desc nfsv2_vnodeop_opv_desc;
193extern struct vnodeopv_desc spec_nfsv2nodeop_opv_desc;
194extern struct vnodeopv_desc fifo_nfsv2nodeop_opv_desc;
195extern struct vnodeopv_desc fdesc_vnodeop_opv_desc;
196extern struct vnodeopv_desc null_vnodeop_opv_desc;
197extern struct vnodeopv_desc hfs_vnodeop_opv_desc;
198extern struct vnodeopv_desc hfs_specop_opv_desc;
199extern struct vnodeopv_desc hfs_fifoop_opv_desc;
200extern struct vnodeopv_desc volfs_vnodeop_opv_desc;
201extern struct vnodeopv_desc cd9660_vnodeop_opv_desc;
202extern struct vnodeopv_desc cd9660_cdxaop_opv_desc;
203extern struct vnodeopv_desc cd9660_specop_opv_desc;
204extern struct vnodeopv_desc cd9660_fifoop_opv_desc;
205extern struct vnodeopv_desc union_vnodeop_opv_desc;
206extern struct vnodeopv_desc devfs_vnodeop_opv_desc;
207extern struct vnodeopv_desc devfs_spec_vnodeop_opv_desc;
208
209struct vnodeopv_desc *vfs_opv_descs[] = {
210#if FFS
211 &ffs_vnodeop_opv_desc,
212 &ffs_specop_opv_desc,
213#if FIFO
214 &ffs_fifoop_opv_desc,
215#endif
216#endif
217 &dead_vnodeop_opv_desc,
218#if FIFO
219 &fifo_vnodeop_opv_desc,
220#endif
221 &spec_vnodeop_opv_desc,
222#if MFS
223 &mfs_vnodeop_opv_desc,
224#endif
225#if NFSCLIENT
226 &nfsv2_vnodeop_opv_desc,
227 &spec_nfsv2nodeop_opv_desc,
228#if FIFO
229 &fifo_nfsv2nodeop_opv_desc,
230#endif
231#endif
232#if FDESC
233 &fdesc_vnodeop_opv_desc,
234#endif
235#if NULLFS
236 &null_vnodeop_opv_desc,
237#endif
238#if HFS
239 &hfs_vnodeop_opv_desc,
240 &hfs_specop_opv_desc,
241#if FIFO
242 &hfs_fifoop_opv_desc,
243#endif
244#endif
245#if CD9660
246 &cd9660_vnodeop_opv_desc,
247 &cd9660_cdxaop_opv_desc,
248 &cd9660_specop_opv_desc,
249#if FIFO
250 &cd9660_fifoop_opv_desc,
251#endif
252#endif
253#if UNION
254 &union_vnodeop_opv_desc,
255#endif
256#if VOLFS
257 &volfs_vnodeop_opv_desc,
258#endif
259#if DEVFS
260 &devfs_vnodeop_opv_desc,
261 &devfs_spec_vnodeop_opv_desc,
262#endif
263 NULL
264};
265