开发者

Ubuntu proc_root_driver missing from <linux/proc_fs.h>

I am trying to compile a kernel module in Ubuntu 10.04 with kernel 2.6.35-22 and it is complaining about proc_root_driver missing. I did some searching and I found that is supposed to define this but in my version of the linux-head开发者_如何学Cers, it isn't defined. Is there another global variable I am supposed to use in its place or is there a way that I can define it somewhere so that the kernel module can compile?


proc_root_driver used to be a pointer to a proc_dir_entry created as proc_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=928b4d8c8963e75bdb133f562b03b07f9aa4844a

Also, 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

proc_array = proc_mkdir("drvnamehere", proc_root_driver);

with code that looks like

proc_array = proc_mkdir("driver/drvnamehere", NULL);

and you should be fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜