From c463cf1caee05050131df0e5ab9c98902859ed6c Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Mon, 24 Nov 1997 18:35:04 +0000 Subject: [PATCH] Fixed multiple definitions of boothowto. Fixed bitrot in the read-only access to kern.boottime. --- sys/kern/init_main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 9ca823cea91..1684bfe378e 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * @(#)init_main.c 8.9 (Berkeley) 1/21/94 - * $Id: init_main.c,v 1.73 1997/11/06 19:29:07 phk Exp $ + * $Id: init_main.c,v 1.74 1997/11/07 08:52:53 phk Exp $ */ #include "opt_devfs.h" @@ -75,7 +75,6 @@ extern struct linker_set sysinit_set; /* XXX */ extern void __main __P((void)); extern void main __P((void *framep)); -extern void secondary_main __P((void)); /* Components of the first process -- never freed. */ static struct session session0; @@ -94,11 +93,11 @@ int cmask = CMASK; extern struct user *proc0paddr; struct vnode *rootvp; -int boothowto; +int boothowto = 0; /* initialized so that it can be patched */ struct timeval boottime; SYSCTL_STRUCT(_kern, KERN_BOOTTIME, boottime, - CTLFLAG_RW, &boottime, timeval, ""); + CTLFLAG_RD, &boottime, timeval, ""); static int shutdowntimeout = 120; SYSCTL_INT(_kern, OID_AUTO, shutdown_timeout, @@ -240,7 +239,6 @@ kproc_start(udata) printf("Start pid=%d <%s>\n",p->p_pid, kp->arg0); #endif - /* save a global descriptor, if desired*/ if( kp->global_procpp != NULL) *kp->global_procpp = p;