ioctl is not called if cmd = 2

后端 未结 2 747

I am developing a kernel module that uses unlocked_ioctl. I tested it with kernel version 2.6.24-23-generic and it works perfectly. Now I tried it with kernel version 3.3.1-

2条回答
  •  眼角桃花
    2020-12-16 18:51

    As pointed out by @Ilya, You are hitting a generic case (FIGETBSZ in this case).

    In general, you want to compose your ioctl commands using the _IO family of macros, with a unique type, to avoid collisions.

    I suggest reading ioctl-number.txt from the kernel documentation for more information, including a list of most used types

提交回复
热议问题