Make media re-init a user choice.

This commit is contained in:
Jordan K. Hubbard 1997-01-29 03:30:24 +00:00
parent 6b0b88d812
commit 1c5237db6f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=22075
2 changed files with 22 additions and 12 deletions

View File

@ -440,15 +440,20 @@ distExtract(char *parent, Distribution *me)
continue;
}
else if (fp == (FILE *)IO_ERROR || intr) { /* Hard error, can't continue */
msgConfirm("Unable to open %s: %s.\nReinitializing media.",
buf, !intr ? "I/O error." : "User interrupt.");
mediaDevice->shutdown(mediaDevice);
if (!mediaDevice->init(mediaDevice)) {
if (!msgYesNo("Unable to open %s: %s.\nReinitialize media?",
buf, !intr ? "I/O error." : "User interrupt.")) {
mediaDevice->shutdown(mediaDevice);
if (!mediaDevice->init(mediaDevice)) {
status = FALSE;
goto done;
}
else
goto getinfo;
}
else {
status = FALSE;
goto done;
}
else
goto getinfo;
}
else {
/* Try to get the distribution as a single file */

View File

@ -440,15 +440,20 @@ distExtract(char *parent, Distribution *me)
continue;
}
else if (fp == (FILE *)IO_ERROR || intr) { /* Hard error, can't continue */
msgConfirm("Unable to open %s: %s.\nReinitializing media.",
buf, !intr ? "I/O error." : "User interrupt.");
mediaDevice->shutdown(mediaDevice);
if (!mediaDevice->init(mediaDevice)) {
if (!msgYesNo("Unable to open %s: %s.\nReinitialize media?",
buf, !intr ? "I/O error." : "User interrupt.")) {
mediaDevice->shutdown(mediaDevice);
if (!mediaDevice->init(mediaDevice)) {
status = FALSE;
goto done;
}
else
goto getinfo;
}
else {
status = FALSE;
goto done;
}
else
goto getinfo;
}
else {
/* Try to get the distribution as a single file */