[PATCH] sys_epoll_create1: decode flag arguments correctly
Mike Frysinger
vapier at gentoo.org
Fri Oct 14 02:33:45 UTC 2011
* desc.c (epollflags): Define.
(sys_epoll_create1): Use epollflags to printflags. Change "O" to "EPOLL".
Reported-by: Марк Коренберг <socketpair at gmail.com>
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
desc.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/desc.c b/desc.c
index fad6cfe..ee9aacc 100644
--- a/desc.c
+++ b/desc.c
@@ -694,11 +694,21 @@ sys_epoll_create(struct tcb *tcp)
return 0;
}
+static const struct xlat epollflags[] = {
+#ifdef EPOLL_CLOEXEC
+ { EPOLL_CLOEXEC, "EPOLL_CLOEXEC" },
+#endif
+#ifdef EPOLL_NONBLOCK
+ { EPOLL_NONBLOCK, "EPOLL_NONBLOCK" },
+#endif
+ { 0, NULL }
+};
+
int
sys_epoll_create1(struct tcb *tcp)
{
if (entering(tcp))
- printflags(open_mode_flags, tcp->u_arg[0], "O_???");
+ printflags(epollflags, tcp->u_arg[0], "EPOLL_???");
return 0;
}
--
1.7.6.1
More information about the Strace-devel
mailing list