aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_linker.c
diff options
context:
space:
mode:
authorMaxime Henrion <mux@FreeBSD.org>2002-08-02 20:56:07 +0000
committerMaxime Henrion <mux@FreeBSD.org>2002-08-02 20:56:07 +0000
commitf2b17113cfce6744db36e98a6a94db557547d784 (patch)
tree97627424d15db9766ee1cd606cc49762644c096f /sys/kern/kern_linker.c
parent4b32dfdcd7b5a77c8c3835d8030067787612073b (diff)
downloadsrc-f2b17113cfce6744db36e98a6a94db557547d784.tar.gz
src-f2b17113cfce6744db36e98a6a94db557547d784.zip
Make the consumers of the linker_load_file() function use
linker_load_module() instead. This fixes a bug where the kernel was unable to properly locate and load a kernel module in vfs_mount() (and probably in the netgraph code as well since it was using the same function). This is because the linker_load_file() does not properly search the module path. Problem found by: peter Reviewed by: peter Thanks to: peter
Notes
Notes: svn path=/head/; revision=101241
Diffstat (limited to 'sys/kern/kern_linker.c')
-rw-r--r--sys/kern/kern_linker.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index f34205cd47fd..e30e52c3c563 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -57,9 +57,6 @@ int kld_debug = 0;
* *verinfo);
*/
static const char *linker_basename(const char *path);
-static int linker_load_module(const char *kldname, const char *modname,
- struct linker_file *parent, struct mod_depend *verinfo,
- struct linker_file **lfpp);
/* Metadata from the static kernel */
SET_DECLARE(modmetadata_set, struct mod_metadata);
@@ -314,7 +311,7 @@ linker_init_kernel_modules(void)
SYSINIT(linker_kernel, SI_SUB_KLD, SI_ORDER_ANY, linker_init_kernel_modules, 0)
-int
+static int
linker_load_file(const char *filename, linker_file_t *result)
{
linker_class_t lc;
@@ -1626,7 +1623,7 @@ linker_basename(const char *path)
* Find a file which contains given module and load it, if "parent" is not
* NULL, register a reference to it.
*/
-static int
+int
linker_load_module(const char *kldname, const char *modname,
struct linker_file *parent, struct mod_depend *verinfo,
struct linker_file **lfpp)