Home > OS >  The Linux kernel 3.13 struct proc_dir_entry make mistakes
The Linux kernel 3.13 struct proc_dir_entry make mistakes

Time:10-01

Kernel 3.13 not struct proc_dir_entry defined? Compile time always prompt error: dereferencing pointer to incomplete type, strives for the great god, the code is:
#include
#include
#include
#include
#include
#include
#include
The static struct proc_dir_entry * mod_entry;
Static int __init tarp_init (void)
{
Mod_entry=create_proc_entry (MODULE_PATH, 0644, NULL);
Mod_entry - & gt; The owner=THIS_MODULE;
Mod_entry - & gt; The read_proc=proc_read;
Mod_entry - & gt; Write_proc=proc_write;
Printk (the KERN_INFO "% s module the loaded \ n", MODULE_NAME);
return 0;
}
Online some people say that such errors, because the header file contains is not complete, but I have to include the header file is put up, however, there is no use,,, a great god give directions, genuflect is begged the question already card for several days,,, break ChongXie!!!!!!!!!!

CodePudding user response:

To the definition of a proc_dir_entry fs/proc/internal. H
Intention is to not like again let developers to directly manipulate the pde object, but rather through the API to complete,
Analogy stdio, h in the FILE

CodePudding user response:

Kernel version is different, I this is the problem, the old kernel. This structure has the read write pointer, the new kernel, this structure does not have
  • Related