I am running into a few problems that I cann't figure out
question 1 )
I have compiled the hello example to get a hello.ko and then I have loaded it using sudo insmod hello.ko
But when I load or unload with (rmmod) I cann't see any messages being printed to the screen???
What is printk doing? Thought it would print to the screen.
Code: Select all
#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void)
{
printk(KERN_INFO "init_module() called\n");
return 0;
}
void cleanup_module(void)
{
printk(KERN_INFO "cleanup_module() called\n");
}
Is their away to list all the kernel functions built in to the kernel that are useable in creating a kernel module?
For example are the only functions you can use in module.h and kernel.h or are their more header files that contain functions that you can use in your module making.