summaryrefslogtreecommitdiffstats
path: root/release/sysinstall/dist.c
diff options
context:
space:
mode:
authordcs <dcs@FreeBSD.org>2000-02-17 17:57:40 +0000
committerdcs <dcs@FreeBSD.org>2000-02-17 17:57:40 +0000
commit3443796a040f6ad790564bd17802aef17cf22842 (patch)
tree092e61d835e612e7837e488f049043b01e19fedf /release/sysinstall/dist.c
parentd245d0951c5a5f14bb09cac616fff48e9a311417 (diff)
downloadFreeBSD-src-3443796a040f6ad790564bd17802aef17cf22842.zip
FreeBSD-src-3443796a040f6ad790564bd17802aef17cf22842.tar.gz
If the installation media disappears in the process of installing
a distribution, recognize it and treat as fatal media error. This happens in the case of a timeout on FTP installations where the user chooses not to select another FTP site, and resulted in segmentation fault. Approved by: jkh
Diffstat (limited to 'release/sysinstall/dist.c')
-rw-r--r--release/sysinstall/dist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/release/sysinstall/dist.c b/release/sysinstall/dist.c
index 5ada8b7..f54a2de 100644
--- a/release/sysinstall/dist.c
+++ b/release/sysinstall/dist.c
@@ -630,7 +630,8 @@ distExtract(char *parent, Distribution *me)
getinfo:
fp = mediaDevice->get(mediaDevice, buf, TRUE);
intr = check_for_interrupt();
- if (fp == (FILE *)IO_ERROR || intr) { /* Hard error, can't continue */
+ if (fp == (FILE *)IO_ERROR || intr || !mediaDevice) {
+ /* Hard error, can't continue */
if (!msgYesNo("Unable to open %s: %s.\nReinitialize media?",
buf, !intr ? "I/O error." : "User interrupt.")) {
mediaDevice->shutdown(mediaDevice);
@@ -676,7 +677,8 @@ distExtract(char *parent, Distribution *me)
getsingle:
fp = mediaDevice->get(mediaDevice, buf, TRUE);
intr = check_for_interrupt();
- if (fp == (FILE *)IO_ERROR || intr) { /* Hard error, can't continue */
+ if (fp == (FILE *)IO_ERROR || intr || !mediaDevice) {
+ /* Hard error, can't continue */
if (intr) /* result of an interrupt */
msgConfirm("Unable to open %s: User interrupt", buf);
else
OpenPOWER on IntegriCloud