summaryrefslogtreecommitdiffstats
path: root/loader/modules.c
diff options
context:
space:
mode:
Diffstat (limited to 'loader/modules.c')
-rw-r--r--loader/modules.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/loader/modules.c b/loader/modules.c
index 4b39179bf..76ed3ec0e 100644
--- a/loader/modules.c
+++ b/loader/modules.c
@@ -11,6 +11,7 @@
#include "isys/isys.h"
#include "loader.h"
+#include "log.h"
#include "modules.h"
struct moduleDependency_s {
@@ -165,8 +166,8 @@ int mlLoadDeps(moduleDeps * moduleDepListPtr, const char * path) {
int mlLoadModule(char * modName, moduleList modLoaded,
moduleDeps modDeps, char ** args, int flags) {
moduleDeps dep;
- char ** nextDep;
- char fileName[80];
+ char ** nextDep, ** argPtr;
+ char fileName[200];
int rc, i;
char ** arg, ** newArgs;
@@ -187,11 +188,20 @@ int mlLoadModule(char * modName, moduleList modLoaded,
}
sprintf(fileName, "%s.o", modName);
+ for (argPtr = args; argPtr && *argPtr; argPtr++) {
+ strcat(fileName, " ");
+ strcat(fileName, *argPtr);
+ }
+
+ sprintf(fileName, "%s.o", modName);
- if (FL_TESTING(flags))
+ if (FL_TESTING(flags)) {
+ logMessage("would have insmod %s", fileName);
rc = 0;
- else
+ } else {
+ logMessage("going to insmod %s", fileName);
rc = insmod(fileName, args);
+ }
if (!rc) {
modLoaded->mods[modLoaded->numModules].name = strdup(modName);