/* Write error */
switch ( errno )
{
+ /* See <_PDCLIB_config.h>. There should be differenciated errno
+ handling here, possibly even a 1:1 mapping; but that is up
+ to the individual platform.
+ */
case EBADF:
case EFAULT:
case EFBIG:
case EIO:
case ENOSPC:
case EPIPE:
- _PDCLIB_errno = _PDCLIB_EIO;
+ _PDCLIB_errno = _PDCLIB_ERROR;
break;
default:
- _PDCLIB_errno = _PDCLIB_EUNKNOWN;
+ /* This should be something like EUNKNOWN. */
+ _PDCLIB_errno = _PDCLIB_ERROR;
break;
}
stream->status |= _PDCLIB_ERRORFLAG;
return 0;
}
}
- _PDCLIB_errno = _PDCLIB_ERETRY;
+ /* Number of retries exceeded. You probably want a different errno value
+ here.
+ */
+ _PDCLIB_errno = _PDCLIB_ERROR;
stream->status |= _PDCLIB_ERRORFLAG;
/* Move unwritten remains to begin of buffer. */
stream->bufidx -= written;