/*hello.c a module programm*/ /* the program runing under kernel mod and it is a module*/ #include" Linux/kernerl.h" #include"lLinux/module.h" /* pross the CONFIG_MODVERSIONS*/ #if CONFIG_MODVERSIONS==1 #define MODVERSIONS #include""Linux/modversions.h" #end if /* the init function*/ int init_module() { printk(" hello world !\n’); printd(" I have runing in a kerner mod@!!\n"); return 1; } /* the distory function*/ int cleanup_module() { printk(" I will shut down myself in kernerl mod /n)"; retutn 0; } |