vfs/poll: correct the return event if inode has disconnect

Change-Id: I0f312a706ab1be8d8ac91b1d77cd3c1be0671457
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2021-09-14 00:35:34 +08:00
parent ad480a31bd
commit 3d22d6b631
+7
View File
@@ -337,6 +337,13 @@ int file_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup)
ret = OK;
}
}
else
{
fds->revents |= (POLLERR | POLLHUP);
nxsem_post(fds->sem);
ret = OK;
}
return ret;
}