From 18cd688d9628d1d08ebafa86335bc6ac5f387854 Mon Sep 17 00:00:00 2001 From: jkh Date: Sun, 8 Feb 1998 20:18:19 +0000 Subject: Remove some ancient cruft discovered during a recent code review. --- usr.sbin/sysinstall/floppy.c | 46 +------------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) (limited to 'usr.sbin/sysinstall/floppy.c') 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) { -- cgit v1.1