mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 08:22:44 +00:00
Make media re-init a user choice.
This commit is contained in:
parent
6b0b88d812
commit
1c5237db6f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=22075
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user