local_socket: remove error log when use nonblock mode
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
4e92e32d7b
commit
e489a308c8
|
@ -78,14 +78,22 @@ int local_fifo_read(FAR struct file *filep, FAR uint8_t *buf,
|
|||
nread = file_read(filep, buf, remaining);
|
||||
if (nread < 0)
|
||||
{
|
||||
if (nread != -EINTR)
|
||||
ret = (int)nread;
|
||||
|
||||
if (nread == -EINTR)
|
||||
{
|
||||
ninfo("Ignoring signal\n");
|
||||
continue;
|
||||
}
|
||||
else if (nread == -EAGAIN)
|
||||
{
|
||||
goto errout;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = (int)nread;
|
||||
nerr("ERROR: file_read() failed: %d\n", ret);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
ninfo("Ignoring signal\n");
|
||||
}
|
||||
else if (nread == 0)
|
||||
{
|
||||
|
|
|
@ -86,13 +86,20 @@ static int local_fifo_write(FAR struct file *filep, FAR const uint8_t *buf,
|
|||
ret = file_write(filep, buf + nwritten, len - nwritten);
|
||||
if (ret < 0)
|
||||
{
|
||||
if (ret != -EINTR)
|
||||
if (ret == -EINTR)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (ret == -EAGAIN)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
nerr("ERROR: file_write failed: %zd\n", ret);
|
||||
break;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
nwritten += ret;
|
||||
|
|
Loading…
Reference in New Issue