diff options
author | Matt Wilson <msw@redhat.com> | 1999-09-24 15:58:48 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-09-24 15:58:48 +0000 |
commit | 68ff68fc176cf4cf1c4a67b53107d82496b95018 (patch) | |
tree | 82ac7f2c4cf173fe507d6ff2e0973d53d81993f2 /loader/devices.c | |
parent | 48c1169514c639476b851d4bd08a48469bae30e2 (diff) | |
download | anaconda-68ff68fc176cf4cf1c4a67b53107d82496b95018.tar.gz anaconda-68ff68fc176cf4cf1c4a67b53107d82496b95018.tar.xz anaconda-68ff68fc176cf4cf1c4a67b53107d82496b95018.zip |
retry on failed driver disk
Diffstat (limited to 'loader/devices.c')
-rw-r--r-- | loader/devices.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/loader/devices.c b/loader/devices.c index 157068828..d7f155e5f 100644 --- a/loader/devices.c +++ b/loader/devices.c @@ -14,6 +14,7 @@ #include "loader.h" #include "misc.h" #include "modules.h" +#include "windows.h" static int getModuleArgs(struct moduleInfo * mod, char *** argPtr) { struct newtWinEntry * entries; @@ -160,24 +161,31 @@ int devCopyDriverDisk(moduleInfoSet modInfo, moduleList modLoaded, int devLoadDriverDisk(moduleInfoSet modInfo, moduleList modLoaded, moduleDeps modDeps, int flags, int cancelNotBack) { int rc; + int done = 0; - rc = newtWinChoice(_("Devices"), _("OK"), - cancelNotBack ? _("Cancel") : _("Back"), - _("Insert your driver disk and press \"OK\" to continue.")); + do { + rc = newtWinChoice(_("Devices"), _("OK"), + cancelNotBack ? _("Cancel") : _("Back"), + _("Insert your driver disk and press \"OK\" to continue.")); - if (rc == 2) return LOADER_BACK; + if (rc == 2) return LOADER_BACK; - mlLoadModule("vfat", NULL, modLoaded, modDeps, NULL, flags); + mlLoadModule("vfat", NULL, modLoaded, modDeps, NULL, flags); - devMakeInode("fd0", "/tmp/fd0"); + devMakeInode("fd0", "/tmp/fd0"); - if (doPwMount("/tmp/fd0", "/tmp/drivers", "vfat", 1, 0, NULL, NULL)) - newtWinMessage(_("Error"), _("OK"), _("Failed to mount floppy disk.")); + if (doPwMount("/tmp/fd0", "/tmp/drivers", "vfat", 1, 0, NULL, NULL)) + newtWinMessage(_("Error"), _("OK"), + _("Failed to mount floppy disk.")); - if (devCopyDriverDisk(modInfo, modLoaded, modDeps, flags, "/tmp/drivers")) - newtWinMessage(_("Error"), _("OK"), - _("The floppy disk you inserted is not a valid driver disk " - "for this release of Red Hat Linux.")); + if (devCopyDriverDisk(modInfo, modLoaded, modDeps, + flags, "/tmp/drivers")) + newtWinMessage(_("Error"), _("OK"), + _("The floppy disk you inserted is not a valid driver disk " + "for this release of Red Hat Linux.")); + else + done = 1; + } while (!done); return 0; } |