红联Linux门户
Linux帮助

内核模块加载 无输出

发布时间:2009-12-22 22:48:29来源:红联作者:suowenair
#include
#include
#include
#include
#define DRIVER_VERSION "V1.0"
#define DRIVER_AUTHOR "RF"
#define DRIVER_DESC "just for test"
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("Dual BSD/GPL");
static int rfmodule_init(void)
{ printk("hello world !:module_init");
return 0;
}
static void rfmodule_exit(void)
{ printk("hello world !:module_exit");
}
module_init(rfmodule_init);
module_exit(rfmodule_exit);

这是内核模块
文件名为test1
[root@localhost driver_study]# insmod test1.ko
[root@localhost driver_study]# rmmod test
ERROR: Module test does not exist in /proc/modules
[root@localhost driver_study]# rmmod test1
[root@localhost driver_study]#
怎么没输出呢???什么原因阿 ?谢谢!
文章评论

共有 0 条评论