Module Name: src
Committed By: jmcneill
Date: Sun Sep 13 23:53:36 UTC 2009
Modified Files:
src/sys/arch/i386/stand/lib: bootmenu.c
Log Message:
If the menuformat is not letter, do not allow letter keys to be aliases
for number keys. snj@ often overshoots the spacebar in a panic and
accidentally hits 'b' instead, which makes the loader boot item '2'.
Can't fix snj@, so fix the boot loader instead.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/i386/stand/lib/bootmenu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/i386/stand/lib/bootmenu.c
diff -u src/sys/arch/i386/stand/lib/bootmenu.c:1.6 src/sys/arch/i386/stand/lib/bootmenu.c:1.7
--- src/sys/arch/i386/stand/lib/bootmenu.c:1.6 Fri Apr 10 19:41:41 2009
+++ src/sys/arch/i386/stand/lib/bootmenu.c Sun Sep 13 23:53:36 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bootmenu.c,v 1.6 2009/04/10 19:41:41 perry Exp $ */
+/* $NetBSD: bootmenu.c,v 1.7 2009/09/13 23:53:36 jmcneill Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -274,6 +274,10 @@
if (choice < 0 || choice >= bootconf.nummenu)
choice = -1;
}
+
+ if (bootconf.menuformat != MENUFORMAT_LETTER && !isnum(*input))
+ choice = -1;
+
return choice;
}