error: unknown field 'ioctl' specified in initializer
error message:
原因: 从2.6.36开始,file_operations结构发生了重大变化
具体看 xx../include/linux/fs.h定义:
取消了原先的
int (*ioctl)(struct inode*, struct file*, unsigned int, unsigned long);
添加来新的成员
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);原来的ioctl 但是返回值变为long
long (*compat_ioctl) (struct file *, unsigned int, unsigned long);内核空间64位,用户空间32位
所以:
1,取消inode:
2,使用unlocked_ioctl
OK.
http://www.cnblogs.com/skynext/
posted on 2014-07-31 14:35 Wigde.Xiao 阅读(671) 评论(0) 编辑 收藏 举报