Re: [RESUBMIT] [PATCH] Use BIOS Keyboard variable to set Numlock

From: H. Peter Anvin
Date: Wed Feb 29 2012 - 13:17:17 EST


On 02/29/2012 03:43 AM, Joshua C. wrote:

I got the idea that we should somehow check the kbd_state and set the
numlock accordingly but this is behind my capabilities. I tried
several times to read those boot_params but I have no idea how to do
it. Where are they stored, how to access them? Help anyone?


There is a global variable called boot_params; the prototype for it is defined in <asm/setup.h>.

So as long as you are on an x86 architecture you can just #include <asm/setup.h> and just access the boot_params structure directly (with the patch provided to add the new field.)

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/