diff options
author | jkh <jkh@FreeBSD.org> | 1998-02-08 20:18:19 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1998-02-08 20:18:19 +0000 |
commit | 18cd688d9628d1d08ebafa86335bc6ac5f387854 (patch) | |
tree | 13b24eb15532d861777eb8edba608e678025135a /usr.sbin | |
parent | 8cf33a55bf8f168c6d4a13481161e8ab620df897 (diff) | |
download | FreeBSD-src-18cd688d9628d1d08ebafa86335bc6ac5f387854.zip FreeBSD-src-18cd688d9628d1d08ebafa86335bc6ac5f387854.tar.gz |
Remove some ancient cruft discovered during a recent code review.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sysinstall/floppy.c | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/usr.sbin/sysinstall/floppy.c b/usr.sbin/sysinstall/floppy.c index f0f51d2..c5bae4a 100644 --- a/usr.sbin/sysinstall/floppy.c +++ b/usr.sbin/sysinstall/floppy.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: floppy.c,v 1.25 1997/04/03 13:44:57 jkh Exp $ + * $Id: floppy.c,v 1.26 1998/01/16 15:07:54 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -70,50 +70,6 @@ floppyChoiceHook(dialogMenuItem *self) return devs ? DITEM_LEAVE_MENU : DITEM_FAILURE; } -/* Our last-ditch routine for getting ROOT from a floppy */ -int -getRootFloppy(void) -{ - int fd = -1; - - if (mediaDevice->type == DEVICE_TYPE_FLOPPY) - floppyDev = mediaDevice; - else { - Device **devs; - int cnt; - - devs = deviceFind(NULL, DEVICE_TYPE_FLOPPY); - cnt = deviceCount(devs); - if (!cnt) { - msgConfirm("No floppy devices found! Something is seriously wrong!"); - return -1; - } - else if (cnt == 1) - floppyDev = devs[0]; - else { - DMenu *menu; - int ret; - WINDOW *save = savescr(); - - menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyChoiceHook, NULL); - menu->title = "Please insert the ROOT floppy"; - ret = dmenuOpenSimple(menu, FALSE); - restorescr(save); - if (!ret) - return -1; - } - } - while (fd == -1) { - msgConfirm("Please insert the ROOT floppy in %s and press [ENTER]", floppyDev->description); - fd = open(floppyDev->devname, O_RDONLY); - if (isDebug()) - msgDebug("getRootFloppy on %s yields fd of %d\n", floppyDev->devname, fd); - if (fd == -1 && msgYesNo("Couldn't open the floppy - do you want to try again?") != 0) - break; - } - return fd; -} - Boolean mediaInitFloppy(Device *dev) { |