From cf4eb29e4783f9f144996339a3e84512d0877644 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 25 Nov 1997 07:07:48 +0000 Subject: Shift a few SYSINT() calls around. this results in a few functions becoming static, and the SYSINITs being close to the code they are related to. setting up the dump device is with dumpsys() and kicking off the scheduler is with the scheduler. Mounting root is with the code that does it. Reviewed by: phk --- sys/kern/vfs_mount.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'sys/kern/vfs_mount.c') diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 6aac763..57a4a54 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94 - * $Id: vfs_conf.c,v 1.16 1997/10/16 07:32:14 julian Exp $ + * $Id: vfs_conf.c,v 1.17 1997/11/07 08:53:10 phk Exp $ */ /* @@ -52,6 +52,7 @@ * on SMP reentrancy */ #include /* dev_t (types.h)*/ +#include #include /* rootvp*/ #include /* curproc*/ #include /* NULLVP*/ @@ -105,7 +106,7 @@ struct vfsconf *vfsconf; * the FFS file system type. This is a matter of * fixing the other file systems, not this code! */ -int +static int vfs_mountrootfs(fsname) char *fsname; { @@ -151,3 +152,24 @@ error_2: /* mount error*/ success: return( err); } + +/* ARGSUSED*/ +static void xxx_vfs_mountroot __P((void *fsnamep)); +#ifdef BOOTP +extern void bootpc_init __P((void)); +#endif +static void +xxx_vfs_mountroot(fsnamep) + void *fsnamep; +{ + /* XXX Add a separate SYSINIT entry */ +#ifdef BOOTP + bootpc_init(); +#endif + /* Mount the root file system. */ + if (vfs_mountrootfs(*((char **) fsnamep))) + panic("cannot mount root"); +} +SYSINIT(mountroot, SI_SUB_MOUNT_ROOT, SI_ORDER_FIRST, xxx_vfs_mountroot, + &mountrootfsname) + -- cgit v1.1