Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion nshlib/nsh_ddcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ static int dd_read(FAR struct dd_s *dd)
nbytes = read(dd->infd, buffer, dd->sectsize - dd->nbytes);
if (nbytes < 0)
{
if (errno == EINTR)
{
continue;
}

FAR struct nsh_vtbl_s *vtbl = dd->vtbl;
nsh_error(vtbl, g_fmtcmdfailed, g_dd, "read", NSH_ERRNO);
return ERROR;
Expand All @@ -134,7 +139,7 @@ static int dd_read(FAR struct dd_s *dd)
dd->nbytes += nbytes;
buffer += nbytes;
}
while (dd->nbytes < dd->sectsize && nbytes > 0);
while (dd->nbytes < dd->sectsize && nbytes != 0);

dd->eof |= (dd->nbytes == 0);
return OK;
Expand Down