Dhanashri Bhate (Dhanashrib@xxxxxxxxxxxx) wrote: > Hi, > I'm trying to replace the standard keyboard driver with my own > module ( which i have copied from kernel_module_programming guide > by Peter Jay Salzman,Ori Pomerantz ) > i.e. module gets loaded properly, but on pressing any key, i don't > see any message from got_char function. Don't know whether the handler > is being called or not! i had put a prink in the handler function > ( not sure its allowed or not!/) to see if control reaches there. > But i don't see this in the /var/log/messages file. > Kernel version is 2.4.18-14. > > am i missing something here? > > Pls Help! > > /* Bottom Half */ > static void got_char(void *scancode) > { > printk("Scan Code %x %s.\n", > (int) *((char *) scancode) & 0x7F, > *((char *) scancode) & 0x80 ? "Released" : "Pressed"); > } The printk has no level. In this case, DEFAULT_MESSAGE_LOGLEVEL is used. If the log level you have specified in your printk is less than 'console_loglevel', the message is printed. I think this is due to this, you can not see your message. Perhaps, I say some mistakes ;) Have a good day. -- ~Christophe -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/