summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-07-15 15:53:22 +0000
committerErik Troan <ewt@redhat.com>2000-07-15 15:53:22 +0000
commitc6a0a0b7933c6a9d34bcc11a5b398981c3ecdaae (patch)
tree8977b4e1419bc6392e2c426054d2f814fc823cdb /loader
parent2f72ca81055c043a1c7e16944375b3a70a1da4ee (diff)
downloadanaconda-c6a0a0b7933c6a9d34bcc11a5b398981c3ecdaae.tar.gz
anaconda-c6a0a0b7933c6a9d34bcc11a5b398981c3ecdaae.tar.xz
anaconda-c6a0a0b7933c6a9d34bcc11a5b398981c3ecdaae.zip
1) don't eject floppies on /dev/fd*, except on sparc
2) fixed when "Do you have driver disk" appears 3) if a list of driers if empty, just ask for a driver disk
Diffstat (limited to 'loader')
-rw-r--r--loader/devices.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/loader/devices.c b/loader/devices.c
index 5911ae488..47fe25cd8 100644
--- a/loader/devices.c
+++ b/loader/devices.c
@@ -26,6 +26,10 @@
void eject(char * deviceName) {
int fd;
+#if !defined(__sparc__)
+ if (!strncmp(deviceName, "fd", 2)) return;
+#endif
+
logMessage("ejecting floppy");
devMakeInode(deviceName, "/tmp/ejectDevice");
@@ -191,7 +195,7 @@ int devInitDriverDisk(moduleInfoSet modInfo, moduleList modLoaded,
int devLoadDriverDisk(moduleInfoSet modInfo, moduleList modLoaded,
moduleDeps *modDepsPtr, int flags, int cancelNotBack,
- char * device) {
+ int askForExistence, char * device) {
int rc;
int done = 0;
struct driverDiskInfo * ddi;
@@ -199,7 +203,7 @@ int devLoadDriverDisk(moduleInfoSet modInfo, moduleList modLoaded,
ddi = calloc(sizeof(*ddi), 1);
do {
- if (FL_EXPERT(flags)) {
+ if (askForExistence) {
rc = newtWinChoice(_("Devices"), _("Yes"),
_("No"),
_("Do you have a driver disk?"));
@@ -286,6 +290,15 @@ static int pickModule(moduleInfoSet modInfo, enum driverMajor type,
}
}
+ if (!numSorted) {
+ /* If nothing appears in this list, force them to insert
+ a driver disk. */
+ i = devLoadDriverDisk(modInfo, modLoaded, modDepsPtr, flags, 0,
+ 1, ddDevice);
+ if (i) return i;
+ continue;
+ }
+
qsort(sortedOrder, numSorted, sizeof(*sortedOrder), sortDrivers);
text = newtTextboxReflowed(-1, -1, _("Which driver should I try?. "
@@ -332,7 +345,7 @@ static int pickModule(moduleInfoSet modInfo, enum driverMajor type,
if (es.reason == NEWT_EXIT_COMPONENT && es.u.co == back) {
return LOADER_BACK;
} else if (es.reason == NEWT_EXIT_HOTKEY && es.u.key == NEWT_KEY_F2) {
- devLoadDriverDisk(modInfo, modLoaded, modDepsPtr, flags, 0,
+ devLoadDriverDisk(modInfo, modLoaded, modDepsPtr, flags, 0, 0,
ddDevice);
continue;
} else {