summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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");
}