summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-09-18 16:08:57 +0000
committerErik Troan <ewt@redhat.com>1999-09-18 16:08:57 +0000
commitc58ce20a0286ffe14e8a8851dab3c9da8583821a (patch)
tree7382e550ad7019d28242c994e55e5c9943431600 /isys
parent9cf632b5090011d27330c7a2d939358f9e22e944 (diff)
downloadanaconda-c58ce20a0286ffe14e8a8851dab3c9da8583821a.tar.gz
anaconda-c58ce20a0286ffe14e8a8851dab3c9da8583821a.tar.xz
anaconda-c58ce20a0286ffe14e8a8851dab3c9da8583821a.zip
fixed appending of new modinfo files
Diffstat (limited to 'isys')
-rw-r--r--isys/moduleinfo.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/isys/moduleinfo.c b/isys/moduleinfo.c
index 91e349027..be6911db3 100644
--- a/isys/moduleinfo.c
+++ b/isys/moduleinfo.c
@@ -48,7 +48,8 @@ moduleInfoSet isysNewModuleInfoSet(void) {
return calloc(sizeof(struct moduleInfoSet_s), 1);
}
-int isysReadModuleInfo(const char * filename, moduleInfoSet mis) {
+int isysReadModuleInfo(const char * filename, moduleInfoSet mis,
+ char * modPath) {
int fd, isIndented;
char * buf, * start, * next, * chptr;
struct stat sb;
@@ -65,7 +66,7 @@ int isysReadModuleInfo(const char * filename, moduleInfoSet mis) {
buf[sb.st_size] = '\0';
close(fd);
- nextModule = mis->moduleList;
+ nextModule = NULL;
modulesAlloced = mis->numModules;
if (strncmp(buf, "Version 0\n", 10)) return -1;
@@ -108,6 +109,10 @@ int isysReadModuleInfo(const char * filename, moduleInfoSet mis) {
nextModule->flags = 0;
nextModule->args = NULL;
nextModule->numArgs = 0;
+ nextModule->path = modPath;
+ } else if (!nextModule) {
+ /* ACK! syntax error */
+ return 1;
} else if (nextModule->major == DRIVER_NONE) {
chptr = start + strlen(start) - 1;
while (!isspace(*chptr) && chptr > start) chptr--;