From bd17df2a745de61097f0c3c64072d11947cb86fb Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 11 Feb 2008 18:09:09 +0000 Subject: add find_modules_directory --- mdk-stage1/modules.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mdk-stage1') diff --git a/mdk-stage1/modules.c b/mdk-stage1/modules.c index cd12f63bb..b9cc3dd87 100644 --- a/mdk-stage1/modules.c +++ b/mdk-stage1/modules.c @@ -37,7 +37,7 @@ #include "modules.h" -static char modules_directory = "/modules"; +static char modules_directory[100]; static struct module_deps_elem * modules_deps = NULL; static struct module_descr_elem * modules_descr = NULL; @@ -96,6 +96,11 @@ static void filename2modname(char * filename) { } } +static void find_modules_directory(void) +{ + strcpy(modules_directory, "/modules"); +} + static int load_modules_dependencies(void) { char * deps_file = asprintf_("%s/%s", modules_directory, "modules.dep"); @@ -207,6 +212,7 @@ static int load_modules_descriptions(void) void init_modules_insmoding(void) { + find_modules_directory(); if (load_modules_dependencies()) { fatal_error("warning, error initing modules stuff, modules loading disabled"); } -- cgit v1.2.1