]> granicus.if.org Git - strace/commitdiff
remember to shift ioctl masks as well
authorWichert Akkerman <wichert@deephackmode.org>
Fri, 3 Aug 2001 21:51:35 +0000 (21:51 +0000)
committerWichert Akkerman <wichert@deephackmode.org>
Fri, 3 Aug 2001 21:51:35 +0000 (21:51 +0000)
ioctl.c

diff --git a/ioctl.c b/ioctl.c
index 9286babce5b6fdadee547eb75fccb1de7763c0a6..dae9804bba920a1275cebf75a482c45cec55f924 100644 (file)
--- 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);