Linux驱动设计ioctl函数的cmd参数不能为2
2017-08-04 10:58
627 查看
Linux驱动程序设计的时候偶然发现的ioctl()函数的cmd参数不能为2,如果为2,ioctl()函数返回-1,网上说就是这样的,正常,不知道为什么,stack
overflow上有一个外国学友的建议:
“In general, you want to compose your ioctl commands
using the
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”
In general, you want to compose your ioctl commands using the
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”
overflow上有一个外国学友的建议:
“In general, you want to compose your ioctl commands
using the
_IOfamily
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”
In general, you want to compose your ioctl commands using the
_IOfamily
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”
相关文章推荐
- Linux驱动设计ioctl函数的cmd参数不能为2
- linux驱动程序的ioctl()函数的cmd参数不能为2
- linux驱动系统调用ioctl()的cmd参数详解【字段划分图】
- Linux 字符设备驱动开发基础(四)—— ioctl() 函数解析
- Linux 字符设备驱动开发基础(四)—— ioctl() 函数解析
- 一步一步学习 Linux 驱动之设备控制接口函数(ioctl 函数)
- 编写LED混杂设备驱动:静态映射,如何用Linux内核里的gpio_request(),gpio_set_value()等函数,ioctl函数
- Linux驱动总结3- unlocked_ioctl和堵塞(waitqueue)读写函数的实现
- linux ioctl函数应用程序及其驱动映射
- Linux驱动总结3- unlocked_ioctl和堵塞(waitqueue)读写函数的实现
- linux ioctl函数及其驱动和应用程序注意事项
- Linux驱动总结3- unlocked_ioctl和堵塞(waitqueue)读写函数的实现
- Linux中与驱动相关的ioctl函数
- linux驱动学习(七) ioctl中的cmd和_IO() , _IOR() , IOW() ,_IOWR() 以及_IOC_NR()的关系
- Linux中与驱动相关的ioctl函数
- Linux驱动总结3- unlocked_ioctl和堵塞(waitqueue)读写函数的实现
- Linux驱动中断函数参数详解
- LINUX驱动IOCTL函数相关知识
- linux驱动学习(七) ioctl中的cmd和_IO() , _IOR() , IOW() ,_IOWR() 以及_IOC_NR()的关系
- Linux中与驱动相关的ioctl函数