lkml.org 
[lkml]   [2012]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [RESUBMIT] [PATCH] Use BIOS Keyboard variable to set Numlock
    From
    2012/2/28 H. Peter Anvin <hpa@zytor.com>:
    > On 02/27/2012 04:08 PM, Joshua C. wrote:
    >>
    >> If so I'm not sure about it. We check the BIOS data area as defined
    >> for IBM PCs (1981), so a fair amount of user should benefit from the
    >> change. Those non-BIOS boots can set the numlock=0 and won't be
    >> affected by this. I think this isa lot easier to implement than doing
    >> it in the BIOS bootstrap code.
    >>
    >
    > Here is a patch to query the BIOS state properly; if you could fill out
    > the rest of the patch then we can merge this in easily enough.
    >
    >        -hpa

    I think this should be the missing part:

    @@ -1432,7 +1439,17 @@ int __init kbd_init(void)
    {
    int i;
    int error;
    -
    +
    +#ifdef CONFIG_KBD_DEFLEDS_PCBIOS
    + int KBD_DEFLEDS = 0;
    + char * bios_kbd_lock_status=boot_params.kbd_status
    +
    + /* Numlock status bit set? */
    + if ((*bios_kbd_lock_status & 0x20) && numlock)
    + KBD_DEFLEDS = 1 << VC_NUMLOCK;
    +#endif
    +
    for (i = 0; i < MAX_NR_CONSOLES; i++) {
    kbd_table[i].ledflagstate = KBD_DEFLEDS;
    kbd_table[i].default_ledflagstate = KBD_DEFLEDS;
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2012-02-28 10:17    [W:4.251 / U:0.108 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site