diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2011-03-04 05:08:02 +0300 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2011-03-04 02:08:02 +0000 |
commit | 3138213bc9a827a372ad9f8009ebcc5d8797ce2d (patch) | |
tree | 9865b7e38bc49124276807f19e96ee032bbc51da /stream.c | |
parent | 9cd385010ec1e0d22be70ff5163db194f1f22735 (diff) | |
download | strace-3138213bc9a827a372ad9f8009ebcc5d8797ce2d.tar.gz strace-3138213bc9a827a372ad9f8009ebcc5d8797ce2d.tar.bz2 strace-3138213bc9a827a372ad9f8009ebcc5d8797ce2d.tar.xz |
Fix decoding of file descriptors
* defs.h (printfd): New function prototype.
* util.c (printfd): New function.
* file.c (print_dirfd): Update prototype to use printfd().
(sys_openat, sys_faccessat, sys_newfstatat, sys_mkdirat, sys_linkat,
sys_unlinkat, sys_readlinkat, sys_renameat, sys_fchownat, sys_fchmodat,
sys_futimesat, sys_utimensat, sys_mknodat): Update use of print_dirfd().
(sys_lseek, sys_llseek, sys_readahead, sys_ftruncate, sys_ftruncate64,
sys_fstat, sys_fstat64, sys_oldfstat, sys_fstatfs, sys_fstatfs64,
sys_fchdir, sys_fchroot, sys_linkat, sys_fchown, sys_fchmod, sys_fsync,
sys_readdir, sys_getdents, sys_getdirentries, sys_fsetxattr,
sys_fgetxattr, sys_flistxattr, sys_fremovexattr, sys_fadvise64,
sys_fadvise64_64, sys_inotify_add_watch, sys_inotify_rm_watch,
sys_fallocate): Use printfd() for decoding of file descriptors.
* desc.c (sys_fcntl, sys_flock, sys_close, sys_dup, do_dup2,
decode_select, sys_epoll_ctl, epoll_wait_common): Use printfd() for
decoding of file descriptors.
* io.c (sys_read, sys_write, sys_readv, sys_writev, sys_pread,
sys_pwrite, sys_sendfile, sys_sendfile64, sys_pread64, sys_pwrite64,
sys_ioctl): Likewise.
* mem.c (print_mmap, sys_mmap64): Likewise.
* signal.c (do_signalfd): Likewise.
* stream.c (decode_poll): Likewise.
* time.c (sys_timerfd_settime, sys_timerfd_gettime): Likewise.
Based on patch from Grant Edwards <grant.b.edwards@gmail.com>.
Diffstat (limited to 'stream.c')
-rw-r--r-- | stream.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -338,7 +338,9 @@ decode_poll(struct tcb *tcp, long pts) tprintf("{fd=%d}", fds.fd); continue; } - tprintf("{fd=%d, events=", fds.fd); + tprintf("{fd="); + printfd(tcp, fds.fd); + tprintf(", events="); printflags(pollflags, fds.events, "POLL???"); tprintf("}"); } |