mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
fs/poll: ouput error log about poll failed
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
@@ -343,12 +343,22 @@ int file_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup)
|
||||
/* Yes, it does... Setup the poll */
|
||||
|
||||
ret = inode->u.i_ops->poll(filep, fds, setup);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("poll failed:%p, setup:%d, ret:%d\n",
|
||||
inode->u.i_ops->poll, setup, ret);
|
||||
}
|
||||
}
|
||||
#ifndef CONFIG_DISABLE_MOUNTPOINT
|
||||
else if (INODE_IS_MOUNTPT(inode) && inode->u.i_mops != NULL &&
|
||||
inode->u.i_mops->poll != NULL)
|
||||
{
|
||||
ret = inode->u.i_mops->poll(filep, fds, setup);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("poll failed:%p, setup:%d, ret:%d\n",
|
||||
inode->u.i_ops->poll, setup, ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user