diff options
author | Erik Troan <ewt@redhat.com> | 2001-10-17 00:45:59 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2001-10-17 00:45:59 +0000 |
commit | c5a76ef39749f8e264292a197242316c3bd604d0 (patch) | |
tree | 6ac96bb0c1fa0431c2fca3aab70ed360304c1149 /loader/modules.c | |
parent | 54718cc5ca279e926a0bf2d5ec577a88f6d1fd16 (diff) | |
download | anaconda-c5a76ef39749f8e264292a197242316c3bd604d0.tar.gz anaconda-c5a76ef39749f8e264292a197242316c3bd604d0.tar.xz anaconda-c5a76ef39749f8e264292a197242316c3bd604d0.zip |
1) some bug fixes to new multiple-module load code
2) streamlined debug output
Diffstat (limited to 'loader/modules.c')
-rw-r--r-- | loader/modules.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/loader/modules.c b/loader/modules.c index 75a72d223..68d10cc0c 100644 --- a/loader/modules.c +++ b/loader/modules.c @@ -263,8 +263,6 @@ char ** tsortModules(moduleList modLoaded, moduleDeps ml, char ** args, list = *listPtr; listSize = *listSizePtr; - - free(deps); } /* add this to the list */ @@ -272,12 +270,16 @@ char ** tsortModules(moduleList modLoaded, moduleDeps ml, char ** args, while (*next) next++; if ((next - list) >= listSize) { + int count = next - list; + listSize += 10; /* leave room for a NULL */ list = realloc(list, sizeof(*list) * (listSize + 1)); *listSizePtr = listSize; *listPtr = list; + + next = list + count; } next[0] = *args; @@ -318,8 +320,6 @@ static int loadModule(const char * modName, char * path, moduleList modLoaded, logMessage("would have insmod %s", path); rc = 0; } else { - logMessage("going to insmod %s", path); - if (!(child = fork())) { int fd = open("/dev/tty3", O_RDWR); @@ -339,8 +339,6 @@ static int loadModule(const char * modName, char * path, moduleList modLoaded, } else { rc = 0; } - - logMessage("%s done w/ rc %d", path, rc); } if (!rc) { @@ -392,6 +390,7 @@ int mlLoadModuleSet(const char * origModNames, char ** list, ** l; char ** paths, ** p; struct moduleInfo * mi; + char items[1024] = ""; start = modNames = alloca(strlen(origModNames) + 1); strcpy(modNames, origModNames); @@ -427,6 +426,13 @@ int mlLoadModuleSet(const char * origModNames, return 1; } + for (i = 0; list[i]; i++) { + strcat(items, " "); + strcat(items, list[i]); + } + + logMessage("modules to insert%s", items); + paths = NULL; if (modInfo) { for (i = 0; list[i]; i++) { @@ -464,8 +470,6 @@ int mlLoadModuleSet(const char * origModNames, } } - logMessage("done inserting modules"); - if (!FL_TESTING(flags)) { int fd; |