8000 extmod/vfs_posix_file: Add poll support for missing ERR,HUP,NVAL values. · jimmo/micropython@22106bf · GitHub 10000
[go: up one dir, main page]

Skip to content

Commit 22106bf

Browse files
committed
extmod/vfs_posix_file: Add poll support for missing ERR,HUP,NVAL values.
Signed-off-by: Damien George <damien@micropython.org>
1 parent 6a17901 commit 22106bf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

extmod/vfs_posix_file.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,15 @@ STATIC mp_uint_t vfs_posix_file_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_
209209
if (pfd.revents & POLLOUT) {
210210
ret |= MP_STREAM_POLL_WR;
211211
}
212+
if (pfd.revents & POLLERR) {
213+
ret |= MP_STREAM_POLL_ERR;
214+
}
215+
if (pfd.revents & POLLHUP) {
216+
ret |= MP_STREAM_POLL_HUP;
217+
}
218+
if (pfd.revents & POLLNVAL) {
219+
ret |= MP_STREAM_POLL_NVAL;
220+
}
212221
}
213222
return ret;
214223
#endif

0 commit comments

Comments
 (0)
0