Results 1 to 5 of 5
how can I modify keyboard.c that is in the kernel and print sth (such as process id list) on the screen when user press a specific key(such as F4 key)....
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-14-2006 #1Just Joined!
- Join Date
- Oct 2006
- Posts
- 3
modifying linux kernel...help
how can I modify keyboard.c that is in the kernel and print sth (such as process id list) on the screen when user press a specific key(such as F4 key).
- 10-15-2006 #2Sorry, but if you want that, that's not the way. Up some abstraction levels. Modify the /usr/share/keymaps/i386/qwerty/*.gz corresponding to your keymap.
Originally Posted by cagatay85
However, doesn't top, ps and other process tools work for you?
Best Regards
- 10-15-2006 #3Just Joined!
- Join Date
- Oct 2006
- Posts
- 3
ok but I wonder how I can modify the kernel and create my own system. according to my example this system print to the screen processes id when user press F4 key. but the problem is there is no "ps" command in kernel level.
- 10-16-2006 #4I know, I just said that because unless this is any kind of kernel-programming exercise there is no reason for trying to solve that problem in kernel-space. That can be resolved with ps, top and other user-space tools from a user-space point of view.
Originally Posted by cagatay85
If regardless of this, you still want to modify your kernel unnecessarily, write your code in keymap.c. It will make a printk for every task's pid while traversing the task list.
Best Regards
- 10-17-2006 #5Just Joined!
- Join Date
- Oct 2006
- Posts
- 3
unless this is any kind of kernel-programming exercise there is no reason for trying to solve that problem in kernel-space.
yes I want to exercise and improve my kernel-programming ability, as I said before I want to create my own system.


Reply With Quote
