LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 823|回复: 2

insmod时报错unresolved symbol proc_register,大牛帮俺看看问题在哪?谢谢

[复制链接]
发表于 2004-5-2 22:26:45 | 显示全部楼层 |阅读模式
源代码:
<my_module.c>

#define MODULE
#define __KERNEL__
#include<linux/kernel.h>
#include<linux/module.h>
#include<linux/proc_fs.h>


int my_read ( char * a, char ** b , off_t c,int d , int e ){
        return 1;
}



struct proc_dir_entry my_mod_proc_file = {
0,
9,
"my_module",
S_IFREG|S_IRUGO,
1,
0,
0,
80,
NULL,
my_read,
NULL
};

int init_module(){
        return proc_register(&proc_root, &my_mod_proc_file);
}

void cleanup_module(){
        proc_unregister(&proc_root,my_mod_proc_file.low_ino);
}

MODULE_LICENSE("GPL");
MODULE_AUTHOR("ZLF");

gcc时无错
insmod module.c时报错
./my_module.o: unresolved symbol proc_register

./my_module.o: unresolved symbol proc_unregister


请各位大牛帮俺看看怎么解决,:thank
发表于 2004-5-3 12:36:58 | 显示全部楼层
 楼主| 发表于 2004-5-3 22:01:37 | 显示全部楼层
搞定了,谢谢kj501^_^
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表