--- linux/drivers/char/keyboard.c.old 2003-02-17 13:30:08.000000000 +0000 +++ linux/drivers/char/keyboard.c 2003-02-17 18:31:13.000000000 +0000 @@ -21,6 +21,7 @@ * * 27-05-97: Added support for the Magic SysRq Key (Martin Mares) * 30-07-98: Dead keys redone, aeb@cwi.nl. + * 17-02-03: numlock command line option, alan@whirlnet.co.uk. */ #include @@ -155,6 +156,8 @@ static struct pm_dev *pm_kbd; +static int defleds = KBD_DEFLEDS; + /* * Many other routines do put_queue, but I think either * they produce ASCII, or they produce some user-assigned @@ -890,6 +893,14 @@ return leds; } +/* Turn numlock on if numlock parameter set. */ +static int __init numlock_setup(char *str) { + defleds = (1 << VC_NUMLOCK); + return 1; +} + +__setup("numlock", numlock_setup); + /* * This routine is the bottom half of the keyboard interrupt * routine, and runs with all interrupts enabled. It does @@ -927,7 +938,7 @@ struct kbd_struct kbd0; extern struct tty_driver console_driver; - kbd0.ledflagstate = kbd0.default_ledflagstate = KBD_DEFLEDS; + kbd0.ledflagstate = kbd0.default_ledflagstate = defleds; kbd0.ledmode = LED_SHOW_FLAGS; kbd0.lockstate = KBD_DEFLOCK; kbd0.slockstate = 0;