From: Wichert Akkerman Date: Fri, 3 Aug 2001 21:51:35 +0000 (+0000) Subject: remember to shift ioctl masks as well X-Git-Tag: v4.5.18~1021 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c595a437d9a610b45b46da20be77aecd06e9d76;p=strace remember to shift ioctl masks as well --- diff --git a/ioctl.c b/ioctl.c index 9286babc..dae9804b 100644 --- a/ioctl.c +++ b/ioctl.c @@ -86,7 +86,7 @@ long code; ioent.code = code; #ifdef LINUX - ioent.code &= (_IOC_NRMASK|_IOC_TYPEMASK); + ioent.code &= (_IOC_NRMASK<<_IOC_NRSHIFT) | (_IOC_TYPEMASK<<_IOC_TYPESHIFT); #endif iop = (struct ioctlent *) bsearch((char *) &ioent, (char *) ioctlent, nioctlents, sizeof(struct ioctlent), compare);