Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Add debug messages to report all attempts to load m...



details:   https://anonhg.NetBSD.org/src/rev/4a83485f180f
branches:  trunk
changeset: 344128:4a83485f180f
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue Mar 15 02:59:24 2016 +0000

description:
Add debug messages to report all attempts to load modules (and their
plists) from the filesystem.  Note that messages are displayed prior
to the actual load activity.  Previous messages are still displayed
for success/failure reporting.

This is an interim solution to the issue in kern/15837 and should be
replaced (or enhanced) once there is an off-system logging capability.

diffstat:

 sys/kern/kern_module_vfs.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 5097e7a79708 -r 4a83485f180f sys/kern/kern_module_vfs.c
--- a/sys/kern/kern_module_vfs.c        Mon Mar 14 09:53:37 2016 +0000
+++ b/sys/kern/kern_module_vfs.c        Tue Mar 15 02:59:24 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_module_vfs.c,v 1.13 2014/12/02 13:00:38 pooka Exp $       */
+/*     $NetBSD: kern_module_vfs.c,v 1.14 2016/03/15 02:59:24 pgoyette Exp $    */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.13 2014/12/02 13:00:38 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.14 2016/03/15 02:59:24 pgoyette Exp $");
 
 #define _MODULE_INTERNAL
 #include <sys/param.h>
@@ -81,6 +81,7 @@
                if (strchr(name,  '/') != NULL) {
                        nochroot = false;
                        snprintf(path, MAXPATHLEN, "%s", name);
+                       module_print("Loading module from %s", path);
                        error = kobj_load_vfs(&mod->mod_kobj, path, nochroot);
                } else
                        error = ENOENT;
@@ -90,6 +91,7 @@
                        nochroot = true;
                        snprintf(path, MAXPATHLEN, "%s/%s/%s.kmod",
                            module_base, name, name);
+                       module_print("Loading module from %s", path);
                        error = kobj_load_vfs(&mod->mod_kobj, path, nochroot);
                } else
                        error = ENOENT;
@@ -177,6 +179,7 @@
                error = ENOMEM;
                goto out1;
        }
+       module_print("Loading plist from %s", proppath);
        
        NDINIT(&nd, LOOKUP, FOLLOW | (nochroot ? NOCHROOT : 0), pb);
 



Home | Main Index | Thread Index | Old Index