Module Name: src
Committed By: pooka
Date: Sun Jan 31 02:04:43 UTC 2010
Modified Files:
src/sys/kern: init_main.c kern_hook.c
src/sys/sys: systm.h
Log Message:
Pass root device as a parameter to domountroothook().
To generate a diff of this commit:
cvs rdiff -u -r1.415 -r1.416 src/sys/kern/init_main.c
cvs rdiff -u -r1.1 -r1.2 src/sys/kern/kern_hook.c
cvs rdiff -u -r1.238 -r1.239 src/sys/sys/systm.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/init_main.c
diff -u src/sys/kern/init_main.c:1.415 src/sys/kern/init_main.c:1.416
--- src/sys/kern/init_main.c:1.415 Sun Jan 31 00:43:37 2010
+++ src/sys/kern/init_main.c Sun Jan 31 02:04:43 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: init_main.c,v 1.415 2010/01/31 00:43:37 hubertf Exp $ */
+/* $NetBSD: init_main.c,v 1.416 2010/01/31 02:04:43 pooka Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.415 2010/01/31 00:43:37 hubertf Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.416 2010/01/31 02:04:43 pooka Exp $");
#include "opt_ddb.h"
#include "opt_ipsec.h"
@@ -349,7 +349,7 @@
bpf_setops();
/* Start module system. */
- module_init();
+ module_init(true);
/*
* Initialize the kernel authorization subsystem and start the
@@ -619,7 +619,7 @@
/* Mount the root file system. */
do {
- domountroothook();
+ domountroothook(root_device);
if ((error = vfs_mountroot())) {
printf("cannot mount root, error = %d\n", error);
boothowto |= RB_ASKNAME;
Index: src/sys/kern/kern_hook.c
diff -u src/sys/kern/kern_hook.c:1.1 src/sys/kern/kern_hook.c:1.2
--- src/sys/kern/kern_hook.c:1.1 Sun Jan 31 01:38:48 2010
+++ src/sys/kern/kern_hook.c Sun Jan 31 02:04:43 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_hook.c,v 1.1 2010/01/31 01:38:48 pooka Exp $ */
+/* $NetBSD: kern_hook.c,v 1.2 2010/01/31 02:04:43 pooka Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_hook.c,v 1.1 2010/01/31 01:38:48 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_hook.c,v 1.2 2010/01/31 02:04:43 pooka Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -183,12 +183,12 @@
}
void
-domountroothook(void)
+domountroothook(struct device *therootdev)
{
struct hook_desc *hd;
LIST_FOREACH(hd, &mountroothook_list, hk_list) {
- if (hd->hk_arg == (void *)root_device) {
+ if (hd->hk_arg == therootdev) {
(*hd->hk_fn)(hd->hk_arg);
return;
}
Index: src/sys/sys/systm.h
diff -u src/sys/sys/systm.h:1.238 src/sys/sys/systm.h:1.239
--- src/sys/sys/systm.h:1.238 Sun Dec 13 04:47:45 2009
+++ src/sys/sys/systm.h Sun Jan 31 02:04:43 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: systm.h,v 1.238 2009/12/13 04:47:45 matt Exp $ */
+/* $NetBSD: systm.h,v 1.239 2010/01/31 02:04:43 pooka Exp $ */
/*-
* Copyright (c) 1982, 1988, 1991, 1993
@@ -360,7 +360,7 @@
void *mountroothook_establish(void (*)(struct device *), struct device *);
void mountroothook_disestablish(void *);
void mountroothook_destroy(void);
-void domountroothook(void);
+void domountroothook(struct device *);
/*
* Exec hooks. Subsystems may want to do cleanup when a process