strace ioctls use only 16 bit?

Roland McGrath roland at
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) |
> #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?


More information about the Strace-devel mailing list