summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_init.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-10-06 20:19:26 +0000
committerderaadt <deraadt@openbsd.org>1997-10-06 20:19:26 +0000
commitf6d35f956ac60c4dbcc91b018b2bcefd71ad933f (patch)
tree918af077b7c363fb7d19243c4ecb7f0165b3bc65 /sys/kern/vfs_init.c
parentBuild generic and genericsbc kernels into snapshot and distribute them (diff)
downloadwireguard-openbsd-f6d35f956ac60c4dbcc91b018b2bcefd71ad933f.tar.xz
wireguard-openbsd-f6d35f956ac60c4dbcc91b018b2bcefd71ad933f.zip
back out vfs lite2 till after 2.2
Diffstat (limited to 'sys/kern/vfs_init.c')
-rw-r--r--sys/kern/vfs_init.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c
index a10e5a3ff41..f956458fa17 100644
--- a/sys/kern/vfs_init.c
+++ b/sys/kern/vfs_init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_init.c,v 1.5 1997/10/06 15:12:39 csapuntz Exp $ */
+/* $OpenBSD: vfs_init.c,v 1.6 1997/10/06 20:20:10 deraadt Exp $ */
/* $NetBSD: vfs_init.c,v 1.6 1996/02/09 19:00:58 christos Exp $ */
/*
@@ -243,8 +243,7 @@ struct vattr va_null;
void
vfsinit()
{
- struct vfsconf *vfsp;
- int i, maxtypenum;
+ struct vfsops **vfsp;
/*
* Initialize the vnode table
@@ -263,15 +262,9 @@ vfsinit()
* Initialize each file system type.
*/
vattr_null(&va_null);
- maxtypenum = 0;
-
- for (vfsp = vfsconf, i = 1; i <= maxvfsconf; i++, vfsp++) {
- if (i < maxvfsconf)
- vfsp->vfc_next = vfsp + 1;
- if (maxtypenum <= vfsp->vfc_typenum)
- maxtypenum = vfsp->vfc_typenum + 1;
- (*vfsp->vfc_vfsops->vfs_init)(vfsp);
- }
- /* next vfc_typenum to be used */
- maxvfsconf = maxtypenum;
+ for (vfsp = &vfssw[0]; vfsp < &vfssw[nvfssw]; vfsp++) {
+ if (*vfsp == NULL)
+ continue;
+ (*(*vfsp)->vfs_init)();
+ }
}