unknown field 'ioctl' specified in initializer

6.8k views Asked by At

I implement a simple example to study the usage of ioctl interface according to the book LDD3. When I compiling the codes, unknown field 'ioctl' specified in initializer. is reported.

I guess the difference of kernel version between LDD3's and mine causes this error. I'm now using Debian 8 with kernel 3.18.14, which is much newer than the version 2.6 in LDD3.

I don't know how ioctl, or even struct file_operations, changed form 2.6 to 3.18, so please show me some reading materials to clarify it. Of course, besides the reading material, I actually need one solution to fix this problem.

1

There are 1 answers

1
Tsyvarev On BEST ANSWER

ioctl has been renamed to unlocked_ioctl. E.g, see that article: http://lwn.net/Articles/115651/

Other operations from struct file_operations, mentioned in LDD3, haven't been changed.