summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-02-11 18:09:09 +0000
committerOlivier Blin <oblin@mandriva.com>2008-02-11 18:09:09 +0000
commitbd17df2a745de61097f0c3c64072d11947cb86fb (patch)
tree1575923082d0537559cfc599286985f02a17321f
parent61596fc4838f41d2b488f71774077cb3581e43e2 (diff)
downloaddrakx-bd17df2a745de61097f0c3c64072d11947cb86fb.tar
drakx-bd17df2a745de61097f0c3c64072d11947cb86fb.tar.gz
drakx-bd17df2a745de61097f0c3c64072d11947cb86fb.tar.bz2
drakx-bd17df2a745de61097f0c3c64072d11947cb86fb.tar.xz
drakx-bd17df2a745de61097f0c3c64072d11947cb86fb.zip
add find_modules_directory
-rw-r--r--mdk-stage1/modules.c8
1 files changed, 7 insertions, 1 deletions
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");
}