More (ab-)usages of "yesno"

This commit is contained in:
martin 2015-05-11 13:01:08 +00:00
parent cc33bc91e6
commit f92de306f4
2 changed files with 7 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: md.c,v 1.3 2015/05/10 10:14:03 martin Exp $ */
/* $NetBSD: md.c,v 1.4 2015/05/11 13:01:08 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -138,13 +138,14 @@ int
md_post_extract(void)
{
char rawdev[100], bootpart[100], bootloader[100];
int contype;
/* if we can't make it bootable, just punt */
if (prep_nobootfix)
return 0;
process_menu(MENU_prepconsole, NULL);
if (yesno == 1)
process_menu(MENU_prepconsole, &contype);
if (contype == 1)
snprintf(bootloader, 100, "/usr/mdec/boot_com0");
else
snprintf(bootloader, 100, "/usr/mdec/boot");

View File

@ -1,4 +1,4 @@
/* $NetBSD: menus.md.en,v 1.1 2014/07/26 19:30:46 dholland Exp $ */
/* $NetBSD: menus.md.en,v 1.2 2015/05/11 13:01:08 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -35,5 +35,5 @@
/* Menu definitions for sysinst. prep version, machine dependent. */
menu prepconsole, title "Select console device", y=-10;
option "com0 (S1)", exit, action { yesno = 1; };
option "VGA", exit, action { yesno = 0; };
option "com0 (S1)", exit, action { *((int*)arg) = 1; };
option "VGA", exit, action { *((int*)arg) = 0; };