mozilla 发表于 2005-9-22 09:58:40

hello world内核模块不能卸载,提示设备忙!


#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/signal.h>

static int __init test_init()
{
      printk("test_init\n");
      return 0;
}

static void __exit test_exit()
{
      printk("exit\n");
}

module_init(test_init);
module_cleanup(test_exit);



rmmod test就提示
ERROR: Removing 'test': Device or resource busy

lsmod看了一下test模块跟别的有点不一样
test                  17920
多了个

怎么回事?

cnhnln 发表于 2005-9-24 14:46:02

友情帮顶

mozilla 发表于 2005-9-30 13:31:44

哈,原来是module_exit不是module_cleanup

good02xaut 发表于 2005-10-17 15:50:48

modprobe -r test
这个命令强!
页: [1]
查看完整版本: hello world内核模块不能卸载,提示设备忙!