fs/poll: ouput error log about poll failed
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
a64171f059
commit
580bdda624
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue