summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2010-10-25 15:30:15 -0400
committerChris Lumens <clumens@redhat.com>2010-10-29 15:40:31 -0400
commit33c0b8e1d33d270b55f8734cd9bc3f3b2f353f0e (patch)
tree0d60e806159c9c4aeb743c416397ba9a5daab6ad
parent604a6cc18759d2f58025734c777f0cc864c95bb8 (diff)
downloadanaconda-33c0b8e1d33d270b55f8734cd9bc3f3b2f353f0e.tar.gz
anaconda-33c0b8e1d33d270b55f8734cd9bc3f3b2f353f0e.tar.xz
anaconda-33c0b8e1d33d270b55f8734cd9bc3f3b2f353f0e.zip
mediaCheckCdrom now supports checking only one piece of media.
-rw-r--r--loader/cdinstall.c64
1 files changed, 8 insertions, 56 deletions
diff --git a/loader/cdinstall.c b/loader/cdinstall.c
index acdb03602..07afdd987 100644
--- a/loader/cdinstall.c
+++ b/loader/cdinstall.c
@@ -167,65 +167,17 @@ static void closeCdromTray(char *device) {
* checksum.
*/
static void mediaCheckCdrom(char *cddriver) {
- int rc;
- int first;
-
- first = 1;
- do {
- char *descr;
- char *tstamp;
- int ejectcd;
-
- /* init every pass */
- ejectcd = 0;
- descr = NULL;
-
- closeCdromTray(cddriver);
-
- /* if first time through, see if they want to eject the CD */
- /* currently in the drive (most likely the CD they booted from) */
- /* and test a different disk. Otherwise just test the disk in */
- /* the drive since it was inserted in the previous pass through */
- /* this loop, so they want it tested. */
- if (first) {
- first = 0;
- rc = newtWinChoice(_("Media Check"), _("Test"), _("Eject Disc"),
- _("Choose \"%s\" to test the disc currently in "
- "the drive, or \"%s\" to eject the disc and "
- "insert another for testing."), _("Test"),
- _("Eject Disc"));
-
- if (rc == 2)
- ejectcd = 1;
- }
+ char *descr, *tstamp;
- if (!ejectcd) {
- readStampFileFromIso(cddriver, &tstamp, &descr);
- doMediaCheck(cddriver, descr);
+ closeCdromTray(cddriver);
+ readStampFileFromIso(cddriver, &tstamp, &descr);
+ doMediaCheck(cddriver, descr);
- if (descr)
- free(descr);
- }
+ if (descr)
+ free(descr);
- ejectCdrom(cddriver);
-
- rc = newtWinChoice(_("Media Check"), _("Test"), _("Continue"),
- _("If you would like to test additional media, "
- "insert the next disc and press \"%s\". "
- "Testing each disc is not strictly required, however "
- "it is highly recommended. Minimally, the discs should "
- "be tested prior to using them for the first time. "
- "After they have been successfully tested, it is not "
- "required to retest each disc prior to using it again."),
- _("Test"), _("Continue"));
-
- if (rc == 2) {
- closeCdromTray(cddriver);
- return;
- } else {
- continue;
- }
- } while (1);
+ if (tstamp)
+ free(tstamp);
}
/* output an error message when CD in drive is not the correct one */