diff options
author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-04-13 13:32:15 +0000 |
---|---|---|
committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-04-13 13:32:15 +0000 |
commit | af4cbec4e16d37d704bd9f82a86f7f52cd278a15 (patch) | |
tree | 75fa9d1786ffde4deed82bc4bb5c8264228a2aca /usr.sbin/sysinstall/floppy.c | |
parent | 61220614a864ec6170035f34a56530e5645d00b6 (diff) | |
download | src-af4cbec4e16d37d704bd9f82a86f7f52cd278a15.tar.gz src-af4cbec4e16d37d704bd9f82a86f7f52cd278a15.zip |
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.
Notes
Notes:
svn path=/head/; revision=15242
Diffstat (limited to 'usr.sbin/sysinstall/floppy.c')
-rw-r--r-- | usr.sbin/sysinstall/floppy.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/usr.sbin/sysinstall/floppy.c b/usr.sbin/sysinstall/floppy.c index 6f0c9d9adfb7..2479bb2cf192 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.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; |