summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-04-01 16:53:38 +0000
committerOlivier Blin <oblin@mandriva.org>2005-04-01 16:53:38 +0000
commit715b96e81e34bc72b3d303eb62006b96f3571e85 (patch)
tree312c63b168cd1348f43ddda1f62a6a4e74dda054
parent9ff529d34ecc582c47f98aa39f185193170b7d76 (diff)
downloaddrakx-715b96e81e34bc72b3d303eb62006b96f3571e85.tar
drakx-715b96e81e34bc72b3d303eb62006b96f3571e85.tar.gz
drakx-715b96e81e34bc72b3d303eb62006b96f3571e85.tar.bz2
drakx-715b96e81e34bc72b3d303eb62006b96f3571e85.tar.xz
drakx-715b96e81e34bc72b3d303eb62006b96f3571e85.zip
try to load ide-generic as fallback when no disk or cdrom is found
-rw-r--r--mdk-stage1/cdrom.c6
-rw-r--r--mdk-stage1/disk.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/mdk-stage1/cdrom.c b/mdk-stage1/cdrom.c
index ff8c8d403..ef762a3c3 100644
--- a/mdk-stage1/cdrom.c
+++ b/mdk-stage1/cdrom.c
@@ -136,6 +136,7 @@ enum return_type cdrom_prepare(void)
char * choice;
int i, count = 0;
enum return_type results;
+ static int already_probed_ide_generic = 0;
my_insmod("ide-cd", ANY_DRIVER_TYPE, NULL, 0);
@@ -166,6 +167,11 @@ enum return_type cdrom_prepare(void)
}
if (count == 0) {
+ if (!already_probed_ide_generic) {
+ already_probed_ide_generic = 1;
+ my_insmod("ide-generic", ANY_DRIVER_TYPE, NULL, 0);
+ return cdrom_prepare();
+ }
stg1_error_message("No CDROM device found.");
i = ask_insmod(SCSI_ADAPTERS);
if (i == RETURN_BACK)
diff --git a/mdk-stage1/disk.c b/mdk-stage1/disk.c
index bb59869ea..e3e84d7da 100644
--- a/mdk-stage1/disk.c
+++ b/mdk-stage1/disk.c
@@ -119,10 +119,16 @@ enum return_type disk_prepare(void)
char * choice;
int i;
enum return_type results;
+ static int already_probed_ide_generic = 0;
int count = get_disks(&medias, &medias_models);
if (count == 0) {
+ if (!already_probed_ide_generic) {
+ already_probed_ide_generic = 1;
+ my_insmod("ide-generic", ANY_DRIVER_TYPE, NULL, 0);
+ return disk_prepare();
+ }
stg1_error_message("No DISK drive found.");
i = ask_insmod(SCSI_ADAPTERS);
if (i == RETURN_BACK)