|
楼主 |
发表于 2004-4-12 03:00:26
|
显示全部楼层
[root@localhost myfirewall]# uname -r
2.4.22-10mdk
我把它改了,还是
helloag.o: couldn't find the kernel version the module was compiled for
( 我的系统已经换成mandrake 9.2了)
---------------------------------------------------
//helloag.c
//It is copied from a book
#include <linux/kernel.h> /*We'ar doing kernel work*/
#include <linux/module.h> /*Specifically a module*/
/*Deal with CONFIG_MODVERSIONS>*/
#if CONFIG_MODVERSIONS==1
#define <linux/modversions.h>
#endif
/*Initialize the module*/
int init_module()
{
printk("Hello. World _ this is the kernel speaking\n");
/* If we returned a non zero value, it means that
* init_module failed and the kernel module can't be loaded*/
return 0;
}
/*cleanup - undid whatever init_module did */
void cleanup_module()
{
printk("Short is the file of the kernel module\n");
}
---------------------------------------------------------------
大哥,你的招数不行啊,唉...
不信试试? |
|