summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/thirdparty.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/thirdparty.c')
-rw-r--r--mdk-stage1/thirdparty.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mdk-stage1/thirdparty.c b/mdk-stage1/thirdparty.c
index 247b7e1f9..78bbf485a 100644
--- a/mdk-stage1/thirdparty.c
+++ b/mdk-stage1/thirdparty.c
@@ -1,6 +1,6 @@
/*
- * Guillaume Cottenceau (gc@mandriva.com)
- * Olivier Blin (oblin@mandriva.com)
+ * Guillaume Cottenceau (gc)
+ * Olivier Blin (oblin)
*
* Copyright 2005 Mandriva
*
@@ -68,7 +68,7 @@ static enum return_type thirdparty_choose_device(char ** device, int probe_only)
#endif
floppy_dev = floppy_device();
- if (strstr(floppy_dev, "/dev/") == floppy_dev) {
+ if (floppy_dev && strstr(floppy_dev, "/dev/") == floppy_dev) {
floppy_dev = floppy_dev + 5;
}
if (floppy_dev)
@@ -132,7 +132,7 @@ static enum return_type thirdparty_choose_device(char ** device, int probe_only)
return results;
}
- if (streq(*device, floppy_dev)) {
+ if (floppy_dev && streq(*device, floppy_dev)) {
/* a floppy is selected, don't try to list partitions */
return RETURN_OK;
}
@@ -244,7 +244,7 @@ static void thirdparty_load_pcitable(const char *modules_location)
char pcitable_filename[100];
FILE * f = NULL;
- sprintf(pcitable_filename, "%s/pcitable", modules_location);
+ snprintf(pcitable_filename, sizeof(pcitable_filename), "%s/pcitable", modules_location);
if (!(f = fopen(pcitable_filename, "rb"))) {
log_message("third_party: no external pcitable found");
return;
@@ -333,7 +333,7 @@ static enum return_type thirdparty_autoload_modules(const char *modules_location
entry++;
}
if (!entry || !*entry) {
- enum insmod_return ret = my_insmod(module, ANY_DRIVER_TYPE, options, 0);
+ enum insmod_return ret = my_modprobe(module, ANY_DRIVER_TYPE, options);
if (ret != INSMOD_OK) {
log_message("\t%s (marfile): failed", module);
stg1_error_message("Insmod %s (marfile) failed.", module);