zhouwei
驱动牛犊
驱动牛犊
  • 注册日期2001-10-23
  • 最后登录2005-07-13
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望1点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1152回复:0

怎么样调用我自己开放出的函数??

楼主#
更多 发布于:2003-06-18 11:56
这是我的测试驱动程序代码:
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/devfs_fs_kernel.h>

#include \"ssr01_10.h\"//该h文件包含Opendevice的定义

static int __init ktest_init(void)
{
unsigned int retval;
void * handle;

retval = Opendevice(&handle,0,0,1);
if(retval)
{
printk(\"ktest::Opendevice Error:%d\\n\",retval);
return 0;
}
printk(\"ktest::Opendevice Success\\n\");

return 0;
}

static void __exit ktest_exit(void)
{
printk(\"ktest::entry ktest_exit\\n\");
}

module_init(ktest_init);
module_exit(ktest_exit);
MODULE_LICENSE(\"GPL\");

其中:函数Opendevice在我的另一个驱动程序driver1中通过EXPORT_SYMBOL(Opendevice)导出的函数,当driver1加载后
在/proc/ksyms中都可以看到我导入的这个函数:c88b806c Opendevice_R__ver_Opendevice [driver1],
但我在把这个测试驱动程序加载时,它找不到函数链接Opendevice
高人:救救我吧!!!!!!!!!!

最新喜欢:

lmhhlmhhlmhhlm...
游客

返回顶部