Please sign in to comment.
Portability pixie dust for ioctl macros
First attempt at supporting the ioctl request macros on bsd and linux. The result seems to work but doesn't seem to be quite right yet. On BSD systems, the top 3 bits indicate the direction of the request: 8 : ioctl parameter will be copied from user space into the kernel 4 : ioctl parameter will be copied into the user supplied buffer from the kernel 2 : no parameters are used The remaining 13 bits are used to indicate the size of the parameter. On Linux systems, only the top 2 bits are used. Setting both bits to 0 indicates a void parameter. The meaning of the bits is reversed: 8 : ioctl parameter will be copied into the user supplied buffer from the kernel 4 : ioctl parameter will be copied from user space into the kernel The remaining 14 bits is used to hold the length of the parameter.
- Loading branch information...
Showing with 7 additions and 11 deletions.