mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
Protect _IOC's 'len' and 'inout' parameters so that _IOC can be used in
more flexible ways.
This commit is contained in:
parent
0b25211b11
commit
7660701e51
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=182391
@ -50,8 +50,8 @@
|
||||
#define IOC_INOUT (IOC_IN|IOC_OUT)
|
||||
#define IOC_DIRMASK (IOC_VOID|IOC_OUT|IOC_IN)
|
||||
|
||||
#define _IOC(inout,group,num,len) \
|
||||
((unsigned long)(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)))
|
||||
#define _IOC(inout,group,num,len) ((unsigned long) \
|
||||
((inout) | (((len) & IOCPARM_MASK) << 16) | ((group) << 8) | (num)))
|
||||
#define _IO(g,n) _IOC(IOC_VOID, (g), (n), 0)
|
||||
#define _IOWINT(g,n) _IOC(IOC_VOID, (g), (n), sizeof(int))
|
||||
#define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t))
|
||||
|
Loading…
Reference in New Issue
Block a user