newlib: fixed error handling in write()

git-svn-id: svn://kolibrios.org@6330 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2016-03-13 00:52:58 +00:00
parent f29da4d0ec
commit b141c63200
3 changed files with 30 additions and 23 deletions

View File

@@ -86,9 +86,10 @@ static int os_write(int handle, const void *buffer, unsigned len, unsigned *amt
ioh->offset+= *amt;
if( *amt != len )
if( *amt && *amt != len )
{
rc = ENOSPC;
errno = rc;
}
return( rc );