diff options
Diffstat (limited to 'mdk-stage1/modules.c')
-rw-r--r-- | mdk-stage1/modules.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mdk-stage1/modules.c b/mdk-stage1/modules.c index 083a81e6a..210579c62 100644 --- a/mdk-stage1/modules.c +++ b/mdk-stage1/modules.c @@ -55,7 +55,7 @@ static enum insmod_return insmod_archived_file(const char * mod_name, char * opt strcat(module_name, ".o"); i = mar_extract_file(archive_name, module_name, "/tmp/"); if (i == 1) { - log_message("file-not-found-in-archive %s (maybe you can try another boot floppy such as 'other.img' for seldom used SCSI modules)", module_name); + log_message("file-not-found-in-archive %s (maybe you can try another boot floppy such as 'hdcdrom_usb.img' or 'network_gigabit_usb.img')", module_name); return INSMOD_FAILED_FILE_NOT_FOUND; } if (i != 0) @@ -201,14 +201,15 @@ int module_already_present(const char * name) { FILE * f; int answ = 0; - f = fopen("/proc/modules", "rb"); - while (1) { - char buf[500]; - if (!fgets(buf, sizeof(buf), f)) break; - if (!strncmp(name, buf, strlen(name)) && buf[strlen(name)] == ' ') - answ = 1; - } - fclose(f); + if ((f = fopen("/proc/modules", "rb"))) { + while (1) { + char buf[500]; + if (!fgets(buf, sizeof(buf), f)) break; + if (!strncmp(name, buf, strlen(name)) && buf[strlen(name)] == ' ') + answ = 1; + } + fclose(f); + } return answ; } |