On Tue, Feb 22, 2011 at 01:00:05PM -0500, Mike Frysinger wrote: > On Tuesday, February 22, 2011 05:19:08 Heiko Carstens wrote: > > On Sun, Feb 20, 2011 at 04:04:21PM -0500, Mike Frysinger wrote: > > > anyone know what's going on with the s390 ioctls in ioctlent.h that are 8 > > > hex digits long instead of the normal 4 ? they date back to the > > > original port (done in 2002). seems like garbage that can be thrown > > > away ... > > > > The more interesting question would be why the strace ioctl code seems to > > ignore a couple of bits of the ioctl commands. In particular it seems to > > ignore the direction and size bits. > > so, for practical purposes today, the extra ioctls in the s390 headers are > not > necessary and may safely be punted. i'm trying to unify all the duplicated > ioctlent content and this was the only hold out.
And, btw, ioctlsort on ppc is broken due to an outdated kludge. I suppose this patch will clean these high bits properly: diff --git a/linux/ioctlsort.c b/linux/ioctlsort.c index afdcc5f..14e7ddc 100644 --- a/linux/ioctlsort.c +++ b/linux/ioctlsort.c @@ -35,10 +35,10 @@ int compare(const void* a, const void* b) { int main(int argc, char** argv) { int i; -#if defined(POWERPC) || defined(__powerpc__) /* unspeakable kludge */ + /* ioctl_lookup() only looks at the number and type bits atm. */ for (i = 0; i < nioctls; i++) - ioctls[i].code &= ~_IOC_DIRMASK; -#endif + ioctls[i].code &= (_IOC_NRMASK << _IOC_NRSHIFT) | + (_IOC_TYPEMASK << _IOC_TYPESHIFT); qsort(ioctls, nioctls, sizeof(ioctls[0]), compare); puts ("\t/* Generated by ioctlsort */"); -- ldv
pgp7wQdFS1aHM.pgp
Description: PGP signature
------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel