Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Silence some common module load errors and explain ...



details:   https://anonhg.NetBSD.org/src/rev/11bea0913eb5
branches:  trunk
changeset: 789902:11bea0913eb5
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Sep 12 19:02:05 2013 +0000

description:
Silence some common module load errors and explain why.

diffstat:

 sys/kern/kern_module.c |  15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 28d5feba0086 -r 11bea0913eb5 sys/kern/kern_module.c
--- a/sys/kern/kern_module.c    Thu Sep 12 19:01:38 2013 +0000
+++ b/sys/kern/kern_module.c    Thu Sep 12 19:02:05 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_module.c,v 1.91 2013/03/24 22:06:37 christos Exp $        */
+/*     $NetBSD: kern_module.c,v 1.92 2013/09/12 19:02:05 christos 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.91 2013/03/24 22:06:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.92 2013/09/12 19:02:05 christos Exp $");
 
 #define _MODULE_INTERNAL
 
@@ -926,8 +926,15 @@
                                            &filedict);
                if (error != 0) {
 #ifdef DEBUG
-                       module_error("vfs load failed for `%s', error %d",
-                           name, error);
+                       /*
+                        * The exec class of modules contains a list of
+                        * modules that is the union of all the modules
+                        * available for each architecture, so we don't
+                        * print an error if they are missing.
+                        */
+                       if (class != MODULE_CLASS_EXEC || errno != ENOENT)
+                               module_error("vfs load failed for `%s', "
+                                   "error %d", name, error);
 #endif
                        kmem_free(mod, sizeof(*mod));
                        depth--;



Home | Main Index | Thread Index | Old Index