strace ioctls use only 16 bit?

Michael Holzheu HOLZHEU at de.ibm.com
Wed Mar 10 05:25:05 UTC 2004




Hi all,

I have a simple question.

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

For our dasd driver we have e.g. the following ioctls:

BIODASDENABLE    : 0x4401
BIODASDFMT          : 0x40104401

At the moment straces reports BIODASDENABLE, if a BIODASDFMT ioctl() is
called.

Why do we not look at the complete ioctl code?
Maybe the reuse of ioctls is a bug in our dasd driver.

Thanks

       Michael

------------------------------------------------------------------------
Linux for E-Server Development
Phone: +49-7031-16-2360,  Bld 71032-03-U09
Email: holzheu at de.ibm.com





More information about the Strace-devel mailing list