local_recvmsg: do not print error message when errno is EAGAIN
Some programs use EAGAIN to determine whether all data has been read, so cancel the error print when the error code is EAGAIN. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
parent
8f297f79d8
commit
5b35c4e5b0
@ -108,7 +108,15 @@ static int psock_fifo_read(FAR struct socket *psock, FAR void *buf,
|
||||
}
|
||||
else
|
||||
{
|
||||
nerr("ERROR: Failed to read packet: %d\n", ret);
|
||||
if (ret == -EAGAIN)
|
||||
{
|
||||
nwarn("WARNING: Failed to read packet: %d\n", ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
nerr("ERROR: Failed to read packet: %d\n", ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user