kernel modules....................
one small doubt....
i wrote the following code in 2.4.20
then recomplied the kernel to 2.4.20 custom..
hello all,
now i tried to compile and insert the module....
the module is getting inserted ,but whatever print msg i have given is not getting printed....( i think the static int hello(void)
itself is not getting called when i load the module)
#include <linux/init.h>
#include <linux/kerenel.h>
#include <linux/module.h>
#include "/root/proj_code/check.c" // some file...........
extern void check(void);
void (*check_ptr)(void) = NULL:
static int hello(void)
{
check_ptr = check;
printk("\n some message \n ");
return 0;
}
static void hello_out(void)
{
printk("\nsomething\n");
}
module_init(hello);
module_exit(hello_out);
MODULE_LICENSE("GPL");
why is this problem , any idea.....?
|