Module Name: src Committed By: pooka Date: Wed Dec 29 15:07:36 UTC 2010
Modified Files: src/sys/kern: kern_module.c Log Message: Pass potential prop dictionary to modcmd when reenabling a builtin module. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/kern/kern_module.c 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/kern_module.c diff -u src/sys/kern/kern_module.c:1.73 src/sys/kern/kern_module.c:1.74 --- src/sys/kern/kern_module.c:1.73 Sat Oct 16 18:09:02 2010 +++ src/sys/kern/kern_module.c Wed Dec 29 15:07:36 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.73 2010/10/16 18:09:02 pgoyette Exp $ */ +/* $NetBSD: kern_module.c,v 1.74 2010/12/29 15:07:36 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.73 2010/10/16 18:09:02 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.74 2010/12/29 15:07:36 pooka Exp $"); #define _MODULE_INTERNAL @@ -90,7 +90,7 @@ static int module_do_load(const char *, bool, int, prop_dictionary_t, module_t **, modclass_t class, bool); static int module_do_unload(const char *, bool); -static int module_do_builtin(const char *, module_t **); +static int module_do_builtin(const char *, module_t **, prop_dictionary_t); static int module_fetch_info(module_t *); static void module_thread(void *); @@ -252,7 +252,8 @@ /* finally, init (if required) */ if (init) { for (i = 0; i < nmodinfo; i++) { - rv = module_do_builtin(modp[i]->mod_info->mi_name,NULL); + rv = module_do_builtin(modp[i]->mod_info->mi_name, + NULL, NULL); /* throw in the towel, recovery hard & not worth it */ if (rv) panic("builtin module \"%s\" init failed: %d", @@ -461,7 +462,7 @@ * MODFLG_MUST_FORCE, don't try to override that!) */ if (mod->mod_flags & MODFLG_MUST_FORCE || - module_do_builtin(mi->mi_name, NULL) != 0) { + module_do_builtin(mi->mi_name, NULL, NULL) != 0) { TAILQ_REMOVE(&module_builtins, mod, mod_chain); TAILQ_INSERT_TAIL(&bi_fail, mod, mod_chain); } @@ -704,7 +705,7 @@ * already linked into the kernel. */ static int -module_do_builtin(const char *name, module_t **modp) +module_do_builtin(const char *name, module_t **modp, prop_dictionary_t props) { const char *p, *s; char buf[MAXMODNAME]; @@ -765,7 +766,7 @@ module_error("too many required modules"); return EINVAL; } - error = module_do_builtin(buf, &mod2); + error = module_do_builtin(buf, &mod2, NULL); if (error != 0) { return error; } @@ -778,7 +779,7 @@ */ prev_active = module_active; module_active = mod; - error = (*mi->mi_modcmd)(MODULE_CMD_INIT, NULL); + error = (*mi->mi_modcmd)(MODULE_CMD_INIT, props); module_active = prev_active; if (error != 0) { module_error("builtin module `%s' " @@ -870,7 +871,7 @@ depth--; return EPERM; } else { - error = module_do_builtin(name, NULL); + error = module_do_builtin(name, NULL, props); depth--; return error; }