Module Name: src
Committed By: pooka
Date: Thu Mar 18 18:25:45 UTC 2010
Modified Files:
src/sys/kern: kern_module.c
Log Message:
Print builtin "use -f" message only if not autoloading. Otherwise
it'll get spammy.
XXX: this should probably be printed iff the toplevel module is
not being autoloaded (i.e. there is a human to interpret the error).
Otherwise disabled dependencies give a misleading EPERM.
To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 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.61 src/sys/kern/kern_module.c:1.62
--- src/sys/kern/kern_module.c:1.61 Thu Mar 18 17:33:18 2010
+++ src/sys/kern/kern_module.c Thu Mar 18 18:25:45 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_module.c,v 1.61 2010/03/18 17:33:18 pooka Exp $ */
+/* $NetBSD: kern_module.c,v 1.62 2010/03/18 18:25:45 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.61 2010/03/18 17:33:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.62 2010/03/18 18:25:45 pooka Exp $");
#define _MODULE_INTERNAL
@@ -771,8 +771,10 @@
}
if (mod) {
if ((flags & MODCTL_LOAD_FORCE) == 0) {
- module_error("use -f to reinstate "
- "builtin module \"%s\"", name);
+ if (!autoload) {
+ module_error("use -f to reinstate "
+ "builtin module \"%s\"", name);
+ }
depth--;
return EPERM;
} else {