From efcddb8e3959972b788b3e57dc00c8c0abcfeb97 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Mon, 5 Oct 1998 11:10:55 +0000 Subject: [PATCH] Taking the GENERIC kernel and commenting out MSDOSFS, CD9660{,_ROOT}, PROCFS, NFS_ROOT will produce kernel that cannot mount a UFS /. Vfs type numbers must be distinct from VFS_GENERIC (and VFS_VFSCONF, but that has the same value and should go away). The problem happens because NFS is the first vfs (in sys/conf order) so it gets type number 0 and conflicts harmfully with VFS_GENERIC which is also 0. The conflict is apparently harmless in the usual case when another vfs gets type number 0, because nfs is the only vfs that has sysctls. Inital fix by: Dima Reason why it worked by: bde --- sys/kern/vfs_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index af89aa6bd001..ba9d001e3bf8 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_init.c 8.3 (Berkeley) 1/4/94 - * $Id: vfs_init.c,v 1.32 1998/02/09 06:09:33 eivind Exp $ + * $Id: vfs_init.c,v 1.33 1998/09/05 17:13:27 bde Exp $ */ @@ -249,9 +249,10 @@ vfsinit(dummy) vfs_opv_init(vfs_opv_descs); /* finish the job */ /* * Initialize each file system type. + * Vfs type numbers must be distinct from VFS_GENERIC (and VFS_VFSCONF). */ vattr_null(&va_null); - maxtypenum = 0; + maxtypenum = VFS_GENERIC + 1; vfc = (struct vfsconf **)vfs_set.ls_items; vfsconf = *vfc; for (; *vfc != NULL; maxtypenum++, vfc++) {