Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Print builtin "use -f" message only if not autoload...
details: https://anonhg.NetBSD.org/src/rev/e9b2f9861d8e
branches: trunk
changeset: 753151:e9b2f9861d8e
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Mar 18 18:25:45 2010 +0000
description:
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.
diffstat:
sys/kern/kern_module.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 4d8844c40a42 -r e9b2f9861d8e sys/kern/kern_module.c
--- a/sys/kern/kern_module.c Thu Mar 18 17:33:18 2010 +0000
+++ b/sys/kern/kern_module.c Thu Mar 18 18:25:45 2010 +0000
@@ -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 {
Home |
Main Index |
Thread Index |
Old Index