137488Smckusick /* 237488Smckusick * Copyright (c) 1989 The Regents of the University of California. 337488Smckusick * All rights reserved. 437488Smckusick * 544456Sbostic * %sccs.include.redist.c% 637488Smckusick * 7*53494Sheideman * @(#)vfs_conf.c 7.7 (Berkeley) 05/14/92 837488Smckusick */ 937488Smckusick 1051456Sbostic #include <sys/param.h> 1151456Sbostic #include <sys/mount.h> 12*53494Sheideman #include <sys/vnode.h> 1351519Sbostic 1451519Sbostic #ifdef FFS 1551456Sbostic #include <ufs/ffs/ffs_extern.h> 1637488Smckusick 1737488Smckusick /* 1837488Smckusick * This specifies the filesystem used to mount the root. 1937488Smckusick * This specification should be done by /etc/config. 2037488Smckusick */ 2151456Sbostic int (*mountroot)() = ffs_mountroot; 2251519Sbostic #endif 2337488Smckusick 2437488Smckusick /* 2537488Smckusick * These define the root filesystem and device. 2637488Smckusick */ 2737488Smckusick struct mount *rootfs; 2837488Smckusick struct vnode *rootdir; 2937488Smckusick 3037488Smckusick /* 3137488Smckusick * Set up the filesystem operations for vnodes. 3237488Smckusick * The types are defined in mount.h. 3337488Smckusick */ 3451519Sbostic #ifdef FFS 3537488Smckusick extern struct vfsops ufs_vfsops; 3652414Storek #define UFS_VFSOPS &ufs_vfsops 3752414Storek #else 3852414Storek #define UFS_VFSOPS NULL 3951519Sbostic #endif 4037488Smckusick 4151456Sbostic #ifdef LFS 4251456Sbostic extern struct vfsops lfs_vfsops; 4352414Storek #define LFS_VFSOPS &lfs_vfsops 4452414Storek #else 4552414Storek #define LFS_VFSOPS NULL 4637488Smckusick #endif 4737488Smckusick 4839046Smckusick #ifdef MFS 4939046Smckusick extern struct vfsops mfs_vfsops; 5052414Storek #define MFS_VFSOPS &mfs_vfsops 5152414Storek #else 5252414Storek #define MFS_VFSOPS NULL 5339046Smckusick #endif 5439046Smckusick 5551456Sbostic #ifdef NFS 5651456Sbostic extern struct vfsops nfs_vfsops; 5752414Storek #define NFS_VFSOPS &nfs_vfsops 5852414Storek #else 5952414Storek #define NFS_VFSOPS NULL 6051456Sbostic #endif 6151456Sbostic 6237488Smckusick struct vfsops *vfssw[] = { 6351456Sbostic NULL, /* 0 = MOUNT_NONE */ 6452414Storek UFS_VFSOPS, /* 1 = MOUNT_UFS */ 6552414Storek NFS_VFSOPS, /* 2 = MOUNT_NFS */ 6652414Storek MFS_VFSOPS, /* 3 = MOUNT_MFS */ 6751456Sbostic NULL, /* 4 = MOUNT_PC */ 6852414Storek LFS_VFSOPS, /* 5 = MOUNT_LFS */ 6937488Smckusick }; 70