diff options
author | Wichert Akkerman <wichert@deephackmode.org> | 2001-03-17 17:26:34 +0000 |
---|---|---|
committer | Wichert Akkerman <wichert@deephackmode.org> | 2001-03-17 17:26:34 +0000 |
commit | a966785753cbabaf44b39c75d387adf423e44caa (patch) | |
tree | c694970ed34bbf25f4e5fbd911bb1f895e402c11 /ioctl.c | |
parent | cf1de759ed0bc7b83665beeb4953b6b37e9e186d (diff) | |
download | strace-a966785753cbabaf44b39c75d387adf423e44caa.tar.gz strace-a966785753cbabaf44b39c75d387adf423e44caa.tar.bz2 strace-a966785753cbabaf44b39c75d387adf423e44caa.tar.xz |
Implement new way to get the ioctl list for Linux: instead of
trying to #include every possible kernel header grab all the relevant
#defines from them and use those directly.
Diffstat (limited to 'ioctl.c')
-rw-r--r-- | ioctl.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -43,6 +43,10 @@ struct ioctlent ioctlent0[] = { #include "ioctlent.h" }; +#ifdef LINUX +#include <asm/ioctl.h> +#endif + int nioctlents0 = sizeof ioctlent0 / sizeof ioctlent0[0]; #if SUPPORTED_PERSONALITIES >= 2 @@ -81,6 +85,9 @@ long code; struct ioctlent *iop, ioent; ioent.code = code; +#ifdef LINUX + ioent.code &= (_IOC_NRMASK|_IOC_TYPEMASK); +#endif iop = (struct ioctlent *) bsearch((char *) &ioent, (char *) ioctlent, nioctlents, sizeof(struct ioctlent), compare); return iop ? iop->symbol : NULL; |