Linux Kernel Module - Creating proc file - proc_root undeclared error

前端 未结 2 1863
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-14 11:53

I copy and paste code from this URL for creating and reading/writing a proc file using a kernel module and get the error that proc_root is undeclared. This same example is on a

2条回答
  •  终归单人心
    2021-02-14 12:46

    That example is out of date. Under the current kernel API, pass NULL for the root of procfs.

    Also, instead of create_proc_entry, you should use proc_create() with a proper const struct file_operations *.

提交回复
热议问题