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