strace ioctls use only 16 bit?

Roland McGrath roland at redhat.com
Fri Apr 16 15:03:07 UTC 2004


> In ioctl_lookup() we only use the lower 16 bits of the ioctl number:
> 
> #ifdef LINUX
>         ioent.code &= (_IOC_NRMASK<<_IOC_NRSHIFT) |
> (_IOC_TYPEMASK<<_IOC_TYPESHIFT);
> #endif

I really don't understand why this masking was put in there at all.
I don't see any reason for it, but it predates my stewardship of the code.

Wichert, can you answer this?



Thanks,
Roland




More information about the Strace-devel mailing list