4
我想创建/ proc下/驱动器/路径proc入口,创建proc入口
我使用这个代码:
struct file *fp = filp_open("/proc/driver",O_RDONLY,0);
struct proc_dir_entry *parent ;
parent = PDE(fp->f_dentry->d_inode);
filp_close(fp, NULL);
proc_create("leds",0,parent,&proc_fops);
但是,当编译我得到错误:
error: implicit declaration of function ‘PDE’ [-Werror=implicit-function-declaration]
我该如何解决这个问题? 在此先感谢。
您是否包含PDE的标题? –
@晓天培:PDE头的路径是什么? – Tiktac
http://lxr.free-electrons.com/source/fs/proc/internal.h#L80 –