Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Mar 1999 16:46:40 +0800
From:      Bugs <p.hornby@ned.dem.csiro.au>
To:        freebsd-bugs@FreeBSD.ORG
Subject:   sysinstall and fixit floppy.
Message-ID:  <36DE486F.41C67EA6@ned.dem.csiro.au>

next in thread | raw e-mail | index | archive | help
Hi,

In /usr/src/release/sysinstall/install.c at about line 355 (Release 3.0)
we find

    while (1) {
        msgConfirm("Please insert a writable fixit floppy and press
return");
        mediaDevice->private = "/mnt2";
        if (!mediaDevice->init(mediaDevice)) {
            if (msgYesNo("The attempt to mount the fixit floppy failed,
bad floppy\n"
                         "or unclean filesystem.  Do you want to try
again?"))
                return DITEM_FAILURE;
        }
    }

which makes it quite impossible to succeed in mounting a fixit floppy.
It should go something like

    while (1) {
        msgConfirm("Please insert a writable fixit floppy and press
return");
        mediaDevice->private = "/mnt2";
        if (mediaDevice->init(mediaDevice)) break;
        if (msgYesNo("The attempt to mount the fixit floppy failed, bad
floppy\n"
                         "or unclean filesystem.  Do you want to try
again?") != 0)
           return DITEM_FAILURE;
    }

There is a similar piece of code earlier relating to the CDROM in which
the problem is fixed by appending an "else break;" (YUK) to the
offending if. Better to reverse the sense of the if and avoid ugly stuff
like else break or else return (and do away with an indent). BTW, note
the change to the msgYesNo test as well. I don't know what it returns,
but this usage is consisent with the CDROM usage earlier in the file, so
one of them was wrong. I punted on the CDROM code being correct and made
this code consistent with that....nobody uses *floppies* anymore :)

Cheers.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36DE486F.41C67EA6>