中缺少 Ubuntu proc_root_driver
我正在尝试使用内核 2.6.35-22 在 Ubuntu 10.04 中编译内核模块,但它抱怨 proc_root_driver 丢失。我做了一些搜索,发现应该定义它,但在我的 linux-headers 版本中,它没有定义。是否有另一个全局变量我应该在其位置使用,或者是否有一种方法可以在某处定义它以便内核模块可以编译?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
proc_root_driver
曾经是指向proc_dir_entry
的指针,创建为proc_mkdir("driver", NULL);
。它于 2008 年 4 月在此提交中被删除:http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=928b4d8c8963e75bdb133f562b03b07f9aa4844a另外,我不我认为它应该是内核 API 的一部分,据我所知,它是一个内部的东西。
实际上,它并没有多大作用。您需要做的就是使用 /proc 下的完整路径,即
用看起来像的代码替换看起来像的代码
,您应该没问题。
proc_root_driver
used to be a pointer to aproc_dir_entry
created asproc_mkdir("driver", NULL);
. It was removed in April 2008 in this commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=928b4d8c8963e75bdb133f562b03b07f9aa4844aAlso, I don't think it was ever supposed to be part of the kernel API, AFAIK it was an internal thing.
It doesn't do much, really. All you need to do is use the full path under /proc, i.e. replace code that looks like
with code that looks like
and you should be fine.