Module Name: src Committed By: pgoyette Date: Tue Mar 15 02:59:24 UTC 2016
Modified Files: src/sys/kern: kern_module_vfs.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/kern/kern_module_vfs.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_vfs.c diff -u src/sys/kern/kern_module_vfs.c:1.13 src/sys/kern/kern_module_vfs.c:1.14 --- src/sys/kern/kern_module_vfs.c:1.13 Tue Dec 2 13:00:38 2014 +++ src/sys/kern/kern_module_vfs.c Tue Mar 15 02:59:24 2016 @@ -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 @@ module_load_vfs(const char *name, int fl 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 @@ module_load_vfs(const char *name, int fl 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 @@ module_load_plist_vfs(const char *modpat error = ENOMEM; goto out1; } + module_print("Loading plist from %s", proppath); NDINIT(&nd, LOOKUP, FOLLOW | (nochroot ? NOCHROOT : 0), pb);