diff options
| author | Damien George <damien@micropython.org> | 2023-07-31 12:32:02 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-08-06 11:54:06 +1000 |
| commit | 22106bf2fa574ba947eceb3b9cfa401c67c6a7eb (patch) | |
| tree | 55be71b8b3fb57acd48c455b686fc7bb621f063b /extmod/vfs_posix_file.c | |
| parent | 6a179019e882c181f2eec1a472f6ec4baf699a9b (diff) | |
extmod/vfs_posix_file: Add poll support for missing ERR,HUP,NVAL values.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod/vfs_posix_file.c')
| -rw-r--r-- | extmod/vfs_posix_file.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/extmod/vfs_posix_file.c b/extmod/vfs_posix_file.c index cfc56df99..41d7622b3 100644 --- a/extmod/vfs_posix_file.c +++ b/extmod/vfs_posix_file.c @@ -209,6 +209,15 @@ STATIC mp_uint_t vfs_posix_file_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_ if (pfd.revents & POLLOUT) { ret |= MP_STREAM_POLL_WR; } + if (pfd.revents & POLLERR) { + ret |= MP_STREAM_POLL_ERR; + } + if (pfd.revents & POLLHUP) { + ret |= MP_STREAM_POLL_HUP; + } + if (pfd.revents & POLLNVAL) { + ret |= MP_STREAM_POLL_NVAL; + } } return ret; #endif |
