137488Smckusick /* 237488Smckusick * Copyright (c) 1989 The Regents of the University of California. 337488Smckusick * All rights reserved. 437488Smckusick * 544456Sbostic * %sccs.include.redist.c% 637488Smckusick * 7*52414Storek * @(#)vfs_conf.c 7.6 (Berkeley) 02/05/92 837488Smckusick */ 937488Smckusick 1051456Sbostic #include <sys/param.h> 1151456Sbostic #include <sys/mount.h> 1251519Sbostic 1351519Sbostic #ifdef FFS 1451456Sbostic #include <ufs/ffs/ffs_extern.h> 1537488Smckusick 1637488Smckusick /* 1737488Smckusick * This specifies the filesystem used to mount the root. 1837488Smckusick * This specification should be done by /etc/config. 1937488Smckusick */ 2051456Sbostic int (*mountroot)() = ffs_mountroot; 2151519Sbostic #endif 2237488Smckusick 2337488Smckusick /* 2437488Smckusick * These define the root filesystem and device. 2537488Smckusick */ 2637488Smckusick struct mount *rootfs; 2737488Smckusick struct vnode *rootdir; 2837488Smckusick 2937488Smckusick /* 3037488Smckusick * Set up the filesystem operations for vnodes. 3137488Smckusick * The types are defined in mount.h. 3237488Smckusick */ 3351519Sbostic #ifdef FFS 3437488Smckusick extern struct vfsops ufs_vfsops; 35*52414Storek #define UFS_VFSOPS &ufs_vfsops 36*52414Storek #else 37*52414Storek #define UFS_VFSOPS NULL 3851519Sbostic #endif 3937488Smckusick 4051456Sbostic #ifdef LFS 4151456Sbostic extern struct vfsops lfs_vfsops; 42*52414Storek #define LFS_VFSOPS &lfs_vfsops 43*52414Storek #else 44*52414Storek #define LFS_VFSOPS NULL 4537488Smckusick #endif 4637488Smckusick 4739046Smckusick #ifdef MFS 4839046Smckusick extern struct vfsops mfs_vfsops; 49*52414Storek #define MFS_VFSOPS &mfs_vfsops 50*52414Storek #else 51*52414Storek #define MFS_VFSOPS NULL 5239046Smckusick #endif 5339046Smckusick 5451456Sbostic #ifdef NFS 5551456Sbostic extern struct vfsops nfs_vfsops; 56*52414Storek #define NFS_VFSOPS &nfs_vfsops 57*52414Storek #else 58*52414Storek #define NFS_VFSOPS NULL 5951456Sbostic #endif 6051456Sbostic 6137488Smckusick struct vfsops *vfssw[] = { 6251456Sbostic NULL, /* 0 = MOUNT_NONE */ 63*52414Storek UFS_VFSOPS, /* 1 = MOUNT_UFS */ 64*52414Storek NFS_VFSOPS, /* 2 = MOUNT_NFS */ 65*52414Storek MFS_VFSOPS, /* 3 = MOUNT_MFS */ 6651456Sbostic NULL, /* 4 = MOUNT_PC */ 67*52414Storek LFS_VFSOPS, /* 5 = MOUNT_LFS */ 6837488Smckusick }; 69