码迷,mamicode.com
首页 > 其他好文 > 详细

error: unknown field 'ioctl' specified in initializer

时间:2014-07-31 16:19:37      阅读:275      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   使用   io   2014   ar   

error message:

bubuko.com,布布扣

原因: 从2.6.36开始,file_operations结构发生了重大变化

具体看  xx../include/linux/fs.h定义:

bubuko.com,布布扣

取消了原先的

 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:

bubuko.com,布布扣

2,使用unlocked_ioctl

bubuko.com,布布扣

OK.

error: unknown field 'ioctl' specified in initializer,布布扣,bubuko.com

error: unknown field 'ioctl' specified in initializer

标签:style   blog   http   color   使用   io   2014   ar   

原文地址:http://www.cnblogs.com/skynext/p/3880682.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!