fs/poll: ouput error log about poll failed

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu1 2024-07-26 11:24:12 +08:00 committed by Xiang Xiao
parent a64171f059
commit 580bdda624
1 changed files with 10 additions and 0 deletions

View File

@ -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