Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/stand/lib If the menuformat is not letter, do ...



details:   https://anonhg.NetBSD.org/src/rev/e7ecd10d5bc5
branches:  trunk
changeset: 747408:e7ecd10d5bc5
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Sep 13 23:53:36 2009 +0000

description:
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.

diffstat:

 sys/arch/i386/stand/lib/bootmenu.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 980a78bd5f5d -r e7ecd10d5bc5 sys/arch/i386/stand/lib/bootmenu.c
--- a/sys/arch/i386/stand/lib/bootmenu.c        Sun Sep 13 22:51:41 2009 +0000
+++ b/sys/arch/i386/stand/lib/bootmenu.c        Sun Sep 13 23:53:36 2009 +0000
@@ -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;
 }
 



Home | Main Index | Thread Index | Old Index