From: Tobias Ulmer Date: Mon, 11 Feb 2019 18:00:14 +0000 (+0100) Subject: le2lib: poll: provide information about POLLERR/POLLHUP/POLLNVAL X-Git-Tag: e2factory-2.3.18rc1~60 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=10d7547527877cf9280ea7a37cfa50d1271e11bb;p=e2factory.git le2lib: poll: provide information about POLLERR/POLLHUP/POLLNVAL Signed-off-by: Tobias Ulmer --- diff --git a/generic/le2lib.c b/generic/le2lib.c index 7834ed7..e5b0b7e 100644 --- a/generic/le2lib.c +++ b/generic/le2lib.c @@ -369,6 +369,18 @@ poll_fd(lua_State *lua) lua_pushboolean(lua, fds[nfds].revents & POLLOUT); lua_rawset(lua, -3); + lua_pushliteral(lua, "POLLERR"); + lua_pushboolean(lua, fds[nfds].revents & POLLERR); + lua_rawset(lua, -3); + + lua_pushliteral(lua, "POLLHUP"); + lua_pushboolean(lua, fds[nfds].revents & POLLHUP); + lua_rawset(lua, -3); + + lua_pushliteral(lua, "POLLNVAL"); + lua_pushboolean(lua, fds[nfds].revents & POLLNVAL); + lua_rawset(lua, -3); + /* commit table to newtable at index */ lua_rawseti(lua, -2, ++index); }