Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Pass root device as a parameter to domountroothook().
details: https://anonhg.NetBSD.org/src/rev/bd651f23dca1
branches: trunk
changeset: 751278:bd651f23dca1
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Jan 31 02:04:43 2010 +0000
description:
Pass root device as a parameter to domountroothook().
diffstat:
sys/kern/init_main.c | 8 ++++----
sys/kern/kern_hook.c | 8 ++++----
sys/sys/systm.h | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
diffs (87 lines):
diff -r a8fa71e166b3 -r bd651f23dca1 sys/kern/init_main.c
--- a/sys/kern/init_main.c Sun Jan 31 01:40:12 2010 +0000
+++ b/sys/kern/init_main.c Sun Jan 31 02:04:43 2010 +0000
@@ -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;
diff -r a8fa71e166b3 -r bd651f23dca1 sys/kern/kern_hook.c
--- a/sys/kern/kern_hook.c Sun Jan 31 01:40:12 2010 +0000
+++ b/sys/kern/kern_hook.c Sun Jan 31 02:04:43 2010 +0000
@@ -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;
}
diff -r a8fa71e166b3 -r bd651f23dca1 sys/sys/systm.h
--- a/sys/sys/systm.h Sun Jan 31 01:40:12 2010 +0000
+++ b/sys/sys/systm.h Sun Jan 31 02:04:43 2010 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index