move setrootfstime() from init_main.c to vfs_subr2.c

This commit is contained in:
pooka 2007-07-30 08:45:26 +00:00
parent 324019adc6
commit a06e97c8ef
2 changed files with 12 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_main.c,v 1.310 2007/07/21 23:15:16 xtraeme Exp $ */
/* $NetBSD: init_main.c,v 1.311 2007/07/30 08:45:26 pooka Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.310 2007/07/21 23:15:16 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.311 2007/07/30 08:45:26 pooka Exp $");
#include "opt_ipsec.h"
#include "opt_multiprocessor.h"
@ -198,6 +198,7 @@ __KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.310 2007/07/21 23:15:16 xtraeme Exp
extern struct proc proc0;
extern struct lwp lwp0;
extern struct cwdinfo cwdi0;
extern time_t rootfstime;
#ifndef curlwp
struct lwp *curlwp = &lwp0;
@ -208,7 +209,6 @@ struct vnode *rootvp, *swapdev_vp;
int boothowto;
int cold = 1; /* still working on startup */
struct timeval boottime; /* time at system startup - will only follow settime deltas */
time_t rootfstime; /* recorded root fs time, if known */
int ncpu = 0; /* number of CPUs configured, assume 1 */
volatile int start_init_exec; /* semaphore for start_init() */
@ -647,12 +647,6 @@ main(void)
/* NOTREACHED */
}
void
setrootfstime(time_t t)
{
rootfstime = t;
}
static void
check_console(struct lwp *l)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_subr2.c,v 1.1 2007/07/29 14:44:09 pooka Exp $ */
/* $NetBSD: vfs_subr2.c,v 1.2 2007/07/30 08:45:26 pooka Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005 The NetBSD Foundation, Inc.
@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_subr2.c,v 1.1 2007/07/29 14:44:09 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_subr2.c,v 1.2 2007/07/30 08:45:26 pooka Exp $");
#include "opt_ddb.h"
@ -480,6 +480,13 @@ vfs_timestamp(struct timespec *ts)
nanotime(ts);
}
time_t rootfstime; /* recorded root fs time, if known */
void
setrootfstime(time_t t)
{
rootfstime = t;
}
#ifdef DDB
static const char buf_flagbits[] = BUF_FLAGBITS;