cannot locate handle_scancode in kernel
Hi
I am writing a kernel module to redirect the output of a barcode scanner to a file. The barcode scanner acts as keyboard. The way to do it is to replace the normal scancode handle by a custom one.
I am actually porting code from kernel 2.4 to kernel 2.6.
In the 2.4 version, I use this in the makefile in the compile command '-DHS_ADDRESS=0x$(word 1,$(shell ksyms -a | grep handle_scancode))'. This finds the address of the handle_scancode function within the kernel symbols.
The problem in 2.6 is that ksyms has disapeared. Moreover, if I do 'cat /proc/kallsyms | grep handle_scancode', it finds nothing. So I searched for handle_scancode in the kernel source code:
$> grep -nRH handle_scancode /usr/src/linux/*
/usr/src/linux/Documentation/input/input.txt:164:x86), and passes them into the handle_scancode function of the
/usr/src/linux/drivers/char/ec3104_keyb.c:221: handle_scancode(scancode, !(scancode & 0x80));
/usr/src/linux/drivers/char/qtronix.c:420: handle_scancode(scancode, down);
/usr/src/linux/drivers/char/scan_keyb.c:50: handle_scancode(*table, !(*new&bit));
/usr/src/linux/drivers/tc/lk201.c:363: handle_scancode(c, (shift_state & LK_LOCK) ? 1 : 0);
/usr/src/linux/drivers/tc/lk201.c:367: handle_scancode(c, (shift_state & LK_SHIFT) ? 1 : 0);
/usr/src/linux/drivers/tc/lk201.c:371: handle_scancode(c, (shift_state & LK_CTRL) ? 1 : 0);
/usr/src/linux/drivers/tc/lk201.c:375: handle_scancode(c, (shift_state & LK_COMP) ? 1 : 0);
/usr/src/linux/drivers/tc/lk201.c:379: handle_scancode(scancodeRemap[LK_KEY_SHIFT], 0);
/usr/src/linux/drivers/tc/lk201.c:381: handle_scancode(scancodeRemap[LK_KEY_CTRL], 0);
/usr/src/linux/drivers/tc/lk201.c:383: handle_scancode(scancodeRemap[LK_KEY_COMP], 0);
/usr/src/linux/drivers/tc/lk201.c:385: handle_scancode(scancodeRemap[LK_KEY_LOCK], 0);
/usr/src/linux/drivers/tc/lk201.c:389: handle_scancode(prev_scancode, 1);
/usr/src/linux/drivers/tc/lk201.c:393: handle_scancode(c, 1);
I find it very puzzling that it shows several references to handle_scancode but no definition.
So the question is: how can I find the address of that function? Or am I looking for the wrong function?
thanks
PS: I am using kernel 2.6.15, that I compiled myself (with a RTAI patch), under Ubuntu Dapper, on a x86 Toshiba laptop.
|