diff options
author | Roland McGrath <roland@redhat.com> | 2003-11-14 02:54:03 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2003-11-14 02:54:03 +0000 |
commit | 2843a4e1d2fca851be6e47e7ff2413b45903ac9a (patch) | |
tree | 74275d627444a6c5ba9b04b7c52338bfbfc02623 /stream.c | |
parent | f25ef3916f41f9a6187c66c2053f0a1591b39812 (diff) | |
download | strace-2843a4e1d2fca851be6e47e7ff2413b45903ac9a.tar.gz strace-2843a4e1d2fca851be6e47e7ff2413b45903ac9a.tar.bz2 strace-2843a4e1d2fca851be6e47e7ff2413b45903ac9a.tar.xz |
2003-09-06 Dmitry V. Levin <ldv@altlinux.org>
* defs.h (ioctl_lookup): Prototype change.
* ioctl.c (ioctl_next_match): New function.
* defs.h: Declare it.
* io.c (sys_ioctl): Use it, to display all possible ioctl names
when there's more than one match.
* ioctl.c (ioctl_lookup): Likewise.
* stream.c (internal_stream_ioctl): Likewise.
Patch from Solar Designer <solar@openwall.com>.
Diffstat (limited to 'stream.c')
-rw-r--r-- | stream.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -932,7 +932,7 @@ struct tcb *tcp; int arg; { struct strioctl si; - char *name; + strict ioctlent *iop; int in_and_out; int timod = 0; #ifdef SI_GETUDATA @@ -947,10 +947,12 @@ int arg; return 1; } if (entering(tcp)) { - name = ioctl_lookup(si.ic_cmd); - if (name) - tprintf(", {ic_cmd=%s", name); - else + iop = ioctl_lookup(si.ic_cmd); + if (iop) { + tprintf(", {ic_cmd=%s", iop->symbol); + while ((iop = ioctl_next_match(iop))) + tprintf(" or %s", iop->symbol); + } else tprintf(", {ic_cmd=%#x", si.ic_cmd); if (si.ic_timout == INFTIM) tprintf(", ic_timout=INFTIM, "); |