Douglas Su
Douglas Su

Reputation: 3364

unknown field 'ioctl' specified in initializer

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.

Upvotes: 2

Views: 6897

Answers (1)

Tsyvarev
Tsyvarev

Reputation: 66108

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.

Upvotes: 5

Related Questions