Date: Sat, 9 Jan 2016 17:21:28 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293571 - stable/10/sys/compat/linux Message-ID: <201601091721.u09HLSZi055715@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Sat Jan 9 17:21:28 2016 New Revision: 293571 URL: https://svnweb.freebsd.org/changeset/base/293571 Log: MFC r283470: Add EPOLLERR flag handling to epoll. Modified: stable/10/sys/compat/linux/linux_event.c stable/10/sys/compat/linux/linux_event.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_event.c ============================================================================== --- stable/10/sys/compat/linux/linux_event.c Sat Jan 9 17:20:19 2016 (r293570) +++ stable/10/sys/compat/linux/linux_event.c Sat Jan 9 17:21:28 2016 (r293571) @@ -255,6 +255,8 @@ epoll_to_kevent(struct thread *td, struc *kev_flags |= EV_ONESHOT; if ((levents & LINUX_EPOLLET) != 0) *kev_flags |= EV_CLEAR; + if ((levents & LINUX_EPOLLERR) != 0) + *kev_flags |= EV_ERROR; /* flags related to what event is registered */ if ((levents & LINUX_EPOLL_EVRD) != 0) { @@ -296,8 +298,10 @@ static void kevent_to_epoll(struct kevent *kevent, struct epoll_event *l_event) { - if ((kevent->flags & EV_ERROR) != 0) + if ((kevent->flags & EV_ERROR) != 0) { + l_event->events = LINUX_EPOLLERR; return; + } switch (kevent->filter) { case EVFILT_READ: Modified: stable/10/sys/compat/linux/linux_event.h ============================================================================== --- stable/10/sys/compat/linux/linux_event.h Sat Jan 9 17:20:19 2016 (r293570) +++ stable/10/sys/compat/linux/linux_event.h Sat Jan 9 17:21:28 2016 (r293571) @@ -46,7 +46,7 @@ #define LINUX_EPOLLET 1u<<31 #define LINUX_EPOLL_EVRD (LINUX_EPOLLIN|LINUX_EPOLLRDNORM \ - |LINUX_EPOLLHUP|LINUX_EPOLLPRI) + |LINUX_EPOLLHUP|LINUX_EPOLLERR|LINUX_EPOLLPRI) #define LINUX_EPOLL_EVWR (LINUX_EPOLLOUT|LINUX_EPOLLWRNORM) #define LINUX_EPOLL_EVSUP (LINUX_EPOLLET|LINUX_EPOLLONESHOT \ |LINUX_EPOLL_EVRD|LINUX_EPOLL_EVWR)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601091721.u09HLSZi055715>