BSD 4_4_Lite1 release
[unix-history] / usr / src / sys / kern / vfs_conf.c
index fd56bc6..2fe39eb 100644 (file)
@@ -1,10 +1,36 @@
 /*
 /*
- * Copyright (c) 1989 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1989, 1993
+ *     The Regents of the University of California.  All rights reserved.
  *
  *
- * %sccs.include.redist.c%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
  *
  *
- *     @(#)vfs_conf.c  7.15 (Berkeley) %G%
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)vfs_conf.c  8.8 (Berkeley) 3/31/94
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -25,7 +51,7 @@ int (*mountroot)() = ffs_mountroot;
  * These define the root filesystem and device.
  */
 struct mount *rootfs;
  * These define the root filesystem and device.
  */
 struct mount *rootfs;
-struct vnode *rootdir;
+struct vnode *rootvnode;
 
 /*
  * Set up the filesystem operations for vnodes.
 
 /*
  * Set up the filesystem operations for vnodes.
@@ -59,13 +85,6 @@ extern       struct vfsops nfs_vfsops;
 #define        NFS_VFSOPS      NULL
 #endif
 
 #define        NFS_VFSOPS      NULL
 #endif
 
-#ifdef LOFS
-extern struct vfsops lofs_vfsops;
-#define        LOFS_VFSOPS     &lofs_vfsops
-#else
-#define        LOFS_VFSOPS     NULL
-#endif
-
 #ifdef FDESC
 extern struct vfsops fdesc_vfsops;
 #define        FDESC_VFSOPS    &fdesc_vfsops
 #ifdef FDESC
 extern struct vfsops fdesc_vfsops;
 #define        FDESC_VFSOPS    &fdesc_vfsops
@@ -94,6 +113,40 @@ extern      struct vfsops umap_vfsops;
 #define UMAP_VFSOPS    NULL
 #endif
 
 #define UMAP_VFSOPS    NULL
 #endif
 
+#ifdef KERNFS
+extern struct vfsops kernfs_vfsops;
+#define KERNFS_VFSOPS  &kernfs_vfsops
+#else
+#define KERNFS_VFSOPS  NULL
+#endif
+
+#ifdef PROCFS
+extern struct vfsops procfs_vfsops;
+#define PROCFS_VFSOPS  &procfs_vfsops
+#else
+#define PROCFS_VFSOPS  NULL
+#endif
+
+#ifdef AFS
+extern struct vfsops afs_vfsops;
+#define AFS_VFSOPS     &afs_vfsops
+#else
+#define AFS_VFSOPS     NULL
+#endif
+
+#ifdef CD9660
+extern struct vfsops cd9660_vfsops;
+#define CD9660_VFSOPS  &cd9660_vfsops
+#else
+#define CD9660_VFSOPS  NULL
+#endif
+
+#ifdef UNION
+extern struct vfsops union_vfsops;
+#define        UNION_VFSOPS    &union_vfsops
+#else
+#define        UNION_VFSOPS    NULL
+#endif
 
 struct vfsops *vfssw[] = {
        NULL,                   /* 0 = MOUNT_NONE */
 
 struct vfsops *vfssw[] = {
        NULL,                   /* 0 = MOUNT_NONE */
@@ -102,11 +155,16 @@ struct vfsops *vfssw[] = {
        MFS_VFSOPS,             /* 3 = MOUNT_MFS */
        NULL,                   /* 4 = MOUNT_PC */
        LFS_VFSOPS,             /* 5 = MOUNT_LFS */
        MFS_VFSOPS,             /* 3 = MOUNT_MFS */
        NULL,                   /* 4 = MOUNT_PC */
        LFS_VFSOPS,             /* 5 = MOUNT_LFS */
-       LOFS_VFSOPS,            /* 6 = MOUNT_LOFS */
+       NULL,                   /* 6 = MOUNT_LOFS */
        FDESC_VFSOPS,           /* 7 = MOUNT_FDESC */
        PORTAL_VFSOPS,          /* 8 = MOUNT_PORTAL */
        NULL_VFSOPS,            /* 9 = MOUNT_NULL */
        UMAP_VFSOPS,            /* 10 = MOUNT_UMAP */
        FDESC_VFSOPS,           /* 7 = MOUNT_FDESC */
        PORTAL_VFSOPS,          /* 8 = MOUNT_PORTAL */
        NULL_VFSOPS,            /* 9 = MOUNT_NULL */
        UMAP_VFSOPS,            /* 10 = MOUNT_UMAP */
+       KERNFS_VFSOPS,          /* 11 = MOUNT_KERNFS */
+       PROCFS_VFSOPS,          /* 12 = MOUNT_PROCFS */
+       AFS_VFSOPS,             /* 13 = MOUNT_AFS */
+       CD9660_VFSOPS,          /* 14 = MOUNT_CD9660 */
+       UNION_VFSOPS,           /* 15 = MOUNT_UNION */
        0
 };
 
        0
 };
 
@@ -131,11 +189,16 @@ extern struct vnodeopv_desc spec_vnodeop_opv_desc;
 extern struct vnodeopv_desc nfsv2_vnodeop_opv_desc;
 extern struct vnodeopv_desc spec_nfsv2nodeop_opv_desc;
 extern struct vnodeopv_desc fifo_nfsv2nodeop_opv_desc;
 extern struct vnodeopv_desc nfsv2_vnodeop_opv_desc;
 extern struct vnodeopv_desc spec_nfsv2nodeop_opv_desc;
 extern struct vnodeopv_desc fifo_nfsv2nodeop_opv_desc;
-extern struct vnodeopv_desc lofs_vnodeop_opv_desc;
 extern struct vnodeopv_desc fdesc_vnodeop_opv_desc;
 extern struct vnodeopv_desc portal_vnodeop_opv_desc;
 extern struct vnodeopv_desc null_vnodeop_opv_desc;
 extern struct vnodeopv_desc umap_vnodeop_opv_desc;
 extern struct vnodeopv_desc fdesc_vnodeop_opv_desc;
 extern struct vnodeopv_desc portal_vnodeop_opv_desc;
 extern struct vnodeopv_desc null_vnodeop_opv_desc;
 extern struct vnodeopv_desc umap_vnodeop_opv_desc;
+extern struct vnodeopv_desc kernfs_vnodeop_opv_desc;
+extern struct vnodeopv_desc procfs_vnodeop_opv_desc;
+extern struct vnodeopv_desc cd9660_vnodeop_opv_desc;
+extern struct vnodeopv_desc cd9660_specop_opv_desc;
+extern struct vnodeopv_desc cd9660_fifoop_opv_desc;
+extern struct vnodeopv_desc union_vnodeop_opv_desc;
 
 struct vnodeopv_desc *vfs_opv_descs[] = {
        &ffs_vnodeop_opv_desc,
 
 struct vnodeopv_desc *vfs_opv_descs[] = {
        &ffs_vnodeop_opv_desc,
@@ -165,9 +228,6 @@ struct vnodeopv_desc *vfs_opv_descs[] = {
        &fifo_nfsv2nodeop_opv_desc,
 #endif
 #endif
        &fifo_nfsv2nodeop_opv_desc,
 #endif
 #endif
-#ifdef LOFS
-       &lofs_vnodeop_opv_desc,
-#endif
 #ifdef FDESC
        &fdesc_vnodeop_opv_desc,
 #endif
 #ifdef FDESC
        &fdesc_vnodeop_opv_desc,
 #endif
@@ -179,6 +239,22 @@ struct vnodeopv_desc *vfs_opv_descs[] = {
 #endif
 #ifdef UMAPFS
        &umap_vnodeop_opv_desc,
 #endif
 #ifdef UMAPFS
        &umap_vnodeop_opv_desc,
+#endif
+#ifdef KERNFS
+       &kernfs_vnodeop_opv_desc,
+#endif
+#ifdef PROCFS
+       &procfs_vnodeop_opv_desc,
+#endif
+#ifdef CD9660
+       &cd9660_vnodeop_opv_desc,
+       &cd9660_specop_opv_desc,
+#ifdef FIFO
+       &cd9660_fifoop_opv_desc,
+#endif
+#endif
+#ifdef UNION
+       &union_vnodeop_opv_desc,
 #endif
        NULL
 };
 #endif
        NULL
 };