forked from KolibriOS/kolibrios
newlib: fixed error handling in write()
git-svn-id: svn://kolibrios.org@6330 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -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 );
|
||||
|
Reference in New Issue
Block a user