1 1.3 martin /* $NetBSD: menus.md,v 1.3 2019/11/16 18:08:59 martin 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.3 martin menu getboottype, title MSG_Bootblocks_selection, y=10, exit, no clear, 38 1.3 martin exitstring MSG_Continue; 39 1.1 dholland display action { msg_display(MSG_getboottype); 40 1.1 dholland switch (((struct x86_boot_params *)arg)->bp_consdev) { 41 1.1 dholland default: 42 1.1 dholland case 0: 43 1.1 dholland msg_display_add(MSG_console_PC); 44 1.1 dholland break; 45 1.1 dholland case 1: case 2: case 3: case 4: 46 1.1 dholland if (menu->cursel == 0) 47 1.1 dholland menu->cursel = ((struct x86_boot_params *)arg)->bp_consdev; 48 1.2 christos msg_fmt_display_add(MSG_console_com, "%u%u", 49 1.1 dholland ((struct x86_boot_params *)arg)->bp_consdev - 1, 50 1.1 dholland ((struct x86_boot_params *)arg)->bp_conspeed); 51 1.1 dholland break; 52 1.1 dholland case ~0: 53 1.1 dholland msg_display_add(MSG_console_unchanged); 54 1.1 dholland break; 55 1.1 dholland }}; 56 1.3 martin option MSG_Use_normal_bootblocks, exit, action 57 1.1 dholland {((struct x86_boot_params *)arg)->bp_consdev = 0; m->cursel = 7;}; 58 1.1 dholland option MSG_Use_serial_com0, action 59 1.1 dholland {((struct x86_boot_params *)arg)->bp_consdev = 1; m->cursel = 5;}; 60 1.1 dholland option MSG_Use_serial_com1, action 61 1.1 dholland {((struct x86_boot_params *)arg)->bp_consdev = 2; m->cursel = 5;}; 62 1.1 dholland option MSG_Use_serial_com2, action 63 1.1 dholland {((struct x86_boot_params *)arg)->bp_consdev = 3; m->cursel = 5;}; 64 1.1 dholland option MSG_Use_serial_com3, action 65 1.1 dholland {((struct x86_boot_params *)arg)->bp_consdev = 4; m->cursel = 5;}; 66 1.1 dholland option MSG_serial_baud_rate, sub menu consolebaud; 67 1.3 martin option MSG_Use_existing_bootblocks, exit, action 68 1.1 dholland {((struct x86_boot_params *)arg)->bp_consdev = ~0; m->cursel = 7;}; 69 1.1 dholland 70 1.1 dholland menu consolebaud, title MSG_serial_baud_rate, x=40, y=13; 71 1.1 dholland display action { 72 1.1 dholland switch (((struct x86_boot_params *)arg)->bp_conspeed) { 73 1.1 dholland default: 74 1.1 dholland case 9600: menu->cursel = 0; break; 75 1.1 dholland case 19200: menu->cursel = 1; break; 76 1.1 dholland case 38400: menu->cursel = 2; break; 77 1.1 dholland case 57600: menu->cursel = 3; break; 78 1.1 dholland case 115200: menu->cursel = 4; break; 79 1.1 dholland case 0: menu->cursel = 5; break; 80 1.1 dholland }}; 81 1.1 dholland option "9600", exit, action 82 1.1 dholland {((struct x86_boot_params *)arg)->bp_conspeed = 9600;}; 83 1.1 dholland option "19200", exit, action 84 1.1 dholland {((struct x86_boot_params *)arg)->bp_conspeed = 19200;}; 85 1.1 dholland option "38400", exit, action 86 1.1 dholland {((struct x86_boot_params *)arg)->bp_conspeed = 38400;}; 87 1.1 dholland option "57600", exit, action 88 1.1 dholland {((struct x86_boot_params *)arg)->bp_conspeed = 57600;}; 89 1.1 dholland option "115200", exit, action 90 1.1 dholland {((struct x86_boot_params *)arg)->bp_conspeed = 115200;}; 91 1.1 dholland option "BIOS", exit, action 92 1.1 dholland {((struct x86_boot_params *)arg)->bp_conspeed = 0;}; 93 1.1 dholland 94 1.1 dholland menu biosonematch, y=-1; 95 1.1 dholland option MSG_This_is_the_correct_geometry, exit, action { }; 96 1.1 dholland option MSG_Set_the_geometry_by_hand, exit, action 97 1.1 dholland {*(void **)arg = NULL;}; 98 1.1 dholland 99 1.1 dholland menu biosmultmatch; 100 1.1 dholland option MSG_Use_one_of_these_disks, exit, action { 101 1.1 dholland int sel; 102 1.1 dholland char res[4]; 103 1.1 dholland 104 1.1 dholland do { 105 1.1 dholland strcpy(res, "0"); 106 1.1 dholland msg_prompt_win(MSG_pickdisk, -1, -1, 0, 0, 107 1.1 dholland res, res, sizeof res); 108 1.1 dholland sel = atoi(res); 109 1.1 dholland } while (sel < 0 || sel >= *(int *)arg); 110 1.1 dholland *(int *)arg = sel; 111 1.1 dholland }; 112 1.1 dholland option MSG_Set_the_geometry_by_hand, exit, action { 113 1.1 dholland *(int *)arg = -1; 114 1.1 dholland }; 115