/contrib/sdk/sources/newlib/libc/sys/iowrite.c |
---|
1,4 → 1,5 |
#include <sys/types.h> |
#include <errno.h> |
#include <sys/kos_io.h> |
int write_file(const char *path,const void *buff, |
24,5 → 25,9 |
"addl $28, %%esp \n\t" |
:"=a" (retval) |
:"a"(path),"b"(buff),"c"(offset),"d"(count),"S"(writes)); |
return retval; |
if(retval == 0) |
return 0; |
else if (retval == 8) |
return ENOSPC; |
return -1; |
}; |
/contrib/sdk/sources/newlib/libc/sys/write.c |
---|
86,9 → 86,10 |
ioh->offset+= *amt; |
if( *amt != len ) |
if( *amt && *amt != len ) |
{ |
rc = ENOSPC; |
errno = rc; |
} |
return( rc ); |