summaryrefslogtreecommitdiffstats
path: root/release/sysinstall/floppy.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-04-13 13:32:15 +0000
committerjkh <jkh@FreeBSD.org>1996-04-13 13:32:15 +0000
commit2d5b4f754ed0dd5ca6a7824a23a9c79d36da264a (patch)
tree75fa9d1786ffde4deed82bc4bb5c8264228a2aca /release/sysinstall/floppy.c
parent52978a6ce95dd0f923ee8fa236b96c972f6622d4 (diff)
downloadFreeBSD-src-2d5b4f754ed0dd5ca6a7824a23a9c79d36da264a.zip
FreeBSD-src-2d5b4f754ed0dd5ca6a7824a23a9c79d36da264a.tar.gz
1. Update all the copyrights to delete useless clauses 3 and 4.
2. Change more of the menu code over to new system. 3. Streamline label editor.
Diffstat (limited to 'release/sysinstall/floppy.c')
-rw-r--r--release/sysinstall/floppy.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/release/sysinstall/floppy.c b/release/sysinstall/floppy.c
index 6f0c9d9..2479bb2 100644
--- a/release/sysinstall/floppy.c
+++ b/release/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.8 1995/12/07 10:33:46 peter Exp $
+ * $Id: floppy.c,v 1.9 1996/03/02 07:31:52 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -21,13 +21,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Jordan Hubbard
- * for the FreeBSD Project.
- * 4. The name of Jordan Hubbard or the FreeBSD project may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -65,19 +58,14 @@ static char *distWanted;
/* For finding floppies */
static int
-floppyChoiceHook(char *str)
+floppyChoiceHook(dialogMenuItem *self)
{
Device **devs;
- /* Clip garbage off the ends */
- string_prune(str);
- str = string_skipwhite(str);
- if (!*str)
- return RET_FAIL;
- devs = deviceFind(str, DEVICE_TYPE_FLOPPY);
+ devs = deviceFind(self->prompt, DEVICE_TYPE_FLOPPY);
if (devs)
floppyDev = devs[0];
- return devs ? RET_DONE : RET_FAIL;
+ return devs ? DITEM_LEAVE_MENU : DITEM_FAILURE;
}
/* Our last-ditch routine for getting ROOT from a floppy */
@@ -105,7 +93,7 @@ getRootFloppy(void)
else {
DMenu *menu;
- menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyChoiceHook);
+ menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyChoiceHook, NULL);
menu->title = "Please insert the ROOT floppy";
if (!dmenuOpenSimple(menu))
return -1;
OpenPOWER on IntegriCloud