net/local: Missed at least one change from read() to nx_read().

This commit is contained in:
Gregory Nutt 2017-10-11 12:16:00 -06:00
parent 181875f3ba
commit 6de41b6cf3

View File

@ -38,7 +38,6 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#if defined(CONFIG_NET) && defined(CONFIG_NET_LOCAL)
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h> #include <stdint.h>
@ -48,8 +47,12 @@
#include <assert.h> #include <assert.h>
#include <debug.h> #include <debug.h>
#include <nuttx/fs/fs.h>
#include "local/local.h" #include "local/local.h"
#if defined(CONFIG_NET) && defined(CONFIG_NET_LOCAL)
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
@ -85,16 +88,13 @@ int local_fifo_read(int fd, FAR uint8_t *buf, size_t *len)
remaining = *len; remaining = *len;
while (remaining > 0) while (remaining > 0)
{ {
nread = read(fd, buf, remaining); nread = nx_read(fd, buf, remaining);
if (nread < 0) if (nread < 0)
{ {
int errcode = get_errno(); if (nread != -EINTR)
DEBUGASSERT(errcode > 0);
if (errcode != EINTR)
{ {
nerr("ERROR: Read failed: %d\n", errcode); ret = (int)nread;
ret = -errcode; nerr("ERROR: nx_read() failed: %d\n", ret);
goto errout; goto errout;
} }