Home | History | Annotate | Line # | Download | only in i386
menus.md revision 1.2
      1  1.2  christos /*	$NetBSD: menus.md,v 1.2 2019/06/20 00:43:56 christos Exp $	*/
      2  1.1  dholland 
      3  1.1  dholland /*
      4  1.1  dholland  * Copyright 1997 Piermont Information Systems Inc.
      5  1.1  dholland  * All rights reserved.
      6  1.1  dholland  *
      7  1.1  dholland  * Written by Philip A. Nelson for Piermont Information Systems Inc.
      8  1.1  dholland  *
      9  1.1  dholland  * Redistribution and use in source and binary forms, with or without
     10  1.1  dholland  * modification, are permitted provided that the following conditions
     11  1.1  dholland  * are met:
     12  1.1  dholland  * 1. Redistributions of source code must retain the above copyright
     13  1.1  dholland  *    notice, this list of conditions and the following disclaimer.
     14  1.1  dholland  * 2. Redistributions in binary form must reproduce the above copyright
     15  1.1  dholland  *    notice, this list of conditions and the following disclaimer in the
     16  1.1  dholland  *    documentation and/or other materials provided with the distribution.
     17  1.1  dholland  * 3. The name of Piermont Information Systems Inc. may not be used to endorse
     18  1.1  dholland  *    or promote products derived from this software without specific prior
     19  1.1  dholland  *    written permission.
     20  1.1  dholland  *
     21  1.1  dholland  * THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
     22  1.1  dholland  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23  1.1  dholland  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24  1.1  dholland  * ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
     25  1.1  dholland  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     26  1.1  dholland  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     27  1.1  dholland  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     28  1.1  dholland  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     29  1.1  dholland  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     30  1.1  dholland  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     31  1.1  dholland  * THE POSSIBILITY OF SUCH DAMAGE.
     32  1.1  dholland  *
     33  1.1  dholland  */
     34  1.1  dholland 
     35  1.1  dholland /* Menu definitions for sysinst. i386 version, machine dependent. */
     36  1.1  dholland 
     37  1.1  dholland menu getboottype, title MSG_Bootblocks_selection, y=10, exit, no clear;
     38  1.1  dholland 	display action { msg_display(MSG_getboottype);
     39  1.1  dholland 		switch (((struct x86_boot_params *)arg)->bp_consdev) {
     40  1.1  dholland 		default:
     41  1.1  dholland 		case 0:
     42  1.1  dholland 			msg_display_add(MSG_console_PC);
     43  1.1  dholland 			break;
     44  1.1  dholland 		case 1: case 2: case 3: case 4:
     45  1.1  dholland 			if (menu->cursel == 0)
     46  1.1  dholland 			    menu->cursel = ((struct x86_boot_params *)arg)->bp_consdev;
     47  1.2  christos 			msg_fmt_display_add(MSG_console_com, "%u%u",
     48  1.1  dholland 			    ((struct x86_boot_params *)arg)->bp_consdev - 1,
     49  1.1  dholland 			    ((struct x86_boot_params *)arg)->bp_conspeed);
     50  1.1  dholland 			break;
     51  1.1  dholland 		case ~0:
     52  1.1  dholland 			msg_display_add(MSG_console_unchanged);
     53  1.1  dholland 			break;
     54  1.1  dholland 		}};
     55  1.1  dholland 	option MSG_Use_normal_bootblocks, action
     56  1.1  dholland 	    {((struct x86_boot_params *)arg)->bp_consdev = 0; m->cursel = 7;};
     57  1.1  dholland 	option MSG_Use_serial_com0, action
     58  1.1  dholland 	    {((struct x86_boot_params *)arg)->bp_consdev = 1; m->cursel = 5;};
     59  1.1  dholland 	option MSG_Use_serial_com1, action
     60  1.1  dholland 	    {((struct x86_boot_params *)arg)->bp_consdev = 2; m->cursel = 5;};
     61  1.1  dholland 	option MSG_Use_serial_com2, action
     62  1.1  dholland 	    {((struct x86_boot_params *)arg)->bp_consdev = 3; m->cursel = 5;};
     63  1.1  dholland 	option MSG_Use_serial_com3, action
     64  1.1  dholland 	    {((struct x86_boot_params *)arg)->bp_consdev = 4; m->cursel = 5;};
     65  1.1  dholland 	option MSG_serial_baud_rate, sub menu consolebaud;
     66  1.1  dholland 	option MSG_Use_existing_bootblocks, action
     67  1.1  dholland 	    {((struct x86_boot_params *)arg)->bp_consdev = ~0; m->cursel = 7;};
     68  1.1  dholland 
     69  1.1  dholland menu consolebaud, title MSG_serial_baud_rate, x=40, y=13;
     70  1.1  dholland 	display action {
     71  1.1  dholland 		switch (((struct x86_boot_params *)arg)->bp_conspeed) {
     72  1.1  dholland 		default:
     73  1.1  dholland 		case   9600: menu->cursel = 0; break;
     74  1.1  dholland 		case  19200: menu->cursel = 1; break;
     75  1.1  dholland 		case  38400: menu->cursel = 2; break;
     76  1.1  dholland 		case  57600: menu->cursel = 3; break;
     77  1.1  dholland 		case 115200: menu->cursel = 4; break;
     78  1.1  dholland 		case      0: menu->cursel = 5; break;
     79  1.1  dholland 		}};
     80  1.1  dholland 	option "9600", exit, action
     81  1.1  dholland 	    {((struct x86_boot_params *)arg)->bp_conspeed = 9600;};
     82  1.1  dholland 	option "19200", exit, action
     83  1.1  dholland 	    {((struct x86_boot_params *)arg)->bp_conspeed = 19200;};
     84  1.1  dholland 	option "38400", exit, action
     85  1.1  dholland 	    {((struct x86_boot_params *)arg)->bp_conspeed = 38400;};
     86  1.1  dholland 	option "57600", exit, action
     87  1.1  dholland 	    {((struct x86_boot_params *)arg)->bp_conspeed = 57600;};
     88  1.1  dholland 	option "115200", exit, action
     89  1.1  dholland 	    {((struct x86_boot_params *)arg)->bp_conspeed = 115200;};
     90  1.1  dholland 	option "BIOS", exit, action
     91  1.1  dholland 	    {((struct x86_boot_params *)arg)->bp_conspeed = 0;};
     92  1.1  dholland 
     93  1.1  dholland menu biosonematch, y=-1;
     94  1.1  dholland 	option MSG_This_is_the_correct_geometry, exit, action { };
     95  1.1  dholland 	option MSG_Set_the_geometry_by_hand, exit, action
     96  1.1  dholland 	    {*(void **)arg = NULL;};
     97  1.1  dholland 
     98  1.1  dholland menu biosmultmatch;
     99  1.1  dholland 	option MSG_Use_one_of_these_disks, exit, action {
    100  1.1  dholland 		int sel;
    101  1.1  dholland 		char res[4];
    102  1.1  dholland 
    103  1.1  dholland 		do {
    104  1.1  dholland 			strcpy(res, "0");
    105  1.1  dholland 			msg_prompt_win(MSG_pickdisk, -1, -1, 0, 0,
    106  1.1  dholland 					res, res, sizeof res);
    107  1.1  dholland 			sel = atoi(res);
    108  1.1  dholland 		} while (sel < 0 || sel >= *(int *)arg);
    109  1.1  dholland 		*(int *)arg = sel;
    110  1.1  dholland 	};
    111  1.1  dholland 	option MSG_Set_the_geometry_by_hand, exit, action {
    112  1.1  dholland 		*(int *)arg = -1;
    113  1.1  dholland 	};
    114