From: Reinhard N. <rn...@gm...> - 2002-03-26 10:25:49
|
Hi, Reinhard Nissl wrote: > > Hi, > > I'm confused now, after doing some tests. > > The kbdrate binary from the distribution works with 2.2.10 und crashes with > 2.4.18 while accessing /dev/ports. I've investigated this further with strace. kbdrate does an ioctl() call. In 2.2.10, the call returns 0 and kbdrate exits. In 2.4.18, the call returns EINVAL and kbdrate tries to set the rate via /dev/ports, with fails on APUS. Looking at drivers/char/vt.c, I found that the ioctl() handler for KDKBDREP calls kbd_rate(). kbd_rate is a function pointer which initially points to _kbd_rate() and this is an empty implementation which simply returns EINVAL. Digging around further, I found a function amiga_kbdrate(), which has the same declaration as _kbd_rate(). There is also a function pointer mach_kbdrate that is similar to kbd_rate, and amiga_kbdrate gets assigned to it in arch/ppc/amiga/config.c. But I didn't find any location, that calls mach_kbdrate(). To make kbdrate work, I assume kbd_rate should be assigned the value of mach_kbdrate. (Where would an appropriate locaten be for this assignment?) A different solution would be, to drop mach_kbdrate and substitute it with kbd_rate. This would then be similar to kd_mksound. kd_mksound is also a function pointer, that is assigned a dummy implementation in drivers/char/vt.c. In arch/ppc/amiga/config.c, kd_mksound is overwritten with amiga_mksound. I would like to substitute mach_kbdrate with kdb_rate for all the archs that use it. What are your comments about doing so? Bye. -- Dipl.-Inform. (FH) Reinhard Nissl mailto:rn...@gm... |