sys_epoll_create1: decode flag arguments correctly

* desc.c (epollflags): Define.
(sys_epoll_create1): Use epollflags to printflags. Change "O" to "EPOLL".

Reported-by: Марк Коренберг <socketpair@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2011-10-13 22:33:45 -04:00 committed by Dmitry V. Levin
parent d99e48c0f3
commit aed334c02c

12
desc.c
View File

@ -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;
}