xref: /csrg-svn/sys/kern/vfs_conf.c (revision 37488)
1*37488Smckusick /*
2*37488Smckusick  * Copyright (c) 1989 The Regents of the University of California.
3*37488Smckusick  * All rights reserved.
4*37488Smckusick  *
5*37488Smckusick  * Redistribution and use in source and binary forms are permitted
6*37488Smckusick  * provided that the above copyright notice and this paragraph are
7*37488Smckusick  * duplicated in all such forms and that any documentation,
8*37488Smckusick  * advertising materials, and other materials related to such
9*37488Smckusick  * distribution and use acknowledge that the software was developed
10*37488Smckusick  * by the University of California, Berkeley.  The name of the
11*37488Smckusick  * University may not be used to endorse or promote products derived
12*37488Smckusick  * from this software without specific prior written permission.
13*37488Smckusick  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14*37488Smckusick  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15*37488Smckusick  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16*37488Smckusick  *
17*37488Smckusick  *	@(#)vfs_conf.c	7.1 (Berkeley) 04/24/89
18*37488Smckusick  */
19*37488Smckusick 
20*37488Smckusick #include "param.h"
21*37488Smckusick #include "mount.h"
22*37488Smckusick 
23*37488Smckusick /*
24*37488Smckusick  * This specifies the filesystem used to mount the root.
25*37488Smckusick  * This specification should be done by /etc/config.
26*37488Smckusick  */
27*37488Smckusick extern int ufs_mountroot();
28*37488Smckusick int (*mountroot)() = ufs_mountroot;
29*37488Smckusick 
30*37488Smckusick /*
31*37488Smckusick  * These define the root filesystem and device.
32*37488Smckusick  */
33*37488Smckusick struct mount *rootfs;
34*37488Smckusick struct vnode *rootdir;
35*37488Smckusick 
36*37488Smckusick /*
37*37488Smckusick  * Set up the filesystem operations for vnodes.
38*37488Smckusick  * The types are defined in mount.h.
39*37488Smckusick  */
40*37488Smckusick extern	struct vfsops ufs_vfsops;
41*37488Smckusick 
42*37488Smckusick #ifdef NFS
43*37488Smckusick extern	struct vfsops nfs_vfsops;
44*37488Smckusick #endif
45*37488Smckusick 
46*37488Smckusick struct vfsops *vfssw[] = {
47*37488Smckusick 	(struct vfsops *)0,	/* 0 = MOUNT_NONE */
48*37488Smckusick 	&ufs_vfsops,		/* 1 = MOUNT_UFS */
49*37488Smckusick #ifdef NFS
50*37488Smckusick 	&nfs_vfsops,		/* 2 = MOUNT_NFS */
51*37488Smckusick #else
52*37488Smckusick 	(struct vfsops *)0,
53*37488Smckusick #endif
54*37488Smckusick 	(struct vfsops *)0,	/* 3 = MOUNT_PC */
55*37488Smckusick };
56