newlib: don't report EOF as error from OS layer, higher layer detects EOF as zero-length read

git-svn-id: svn://kolibrios.org@5204 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse 2014-12-01 11:19:01 +00:00
parent ba2b0659ac
commit 8d57a1a87d
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ CORE_SRCS = {
"reent/impure.c", "reent/init_reent.c", "reent/getreent.c", "reent/mutex.c",
"reent/gettimeofdayr.c", "reent/isattyr.c", "reent/openr.c", "reent/closer.c",
"reent/linkr.c", "reent/readr.c", "reent/lseekr.c", "reent/fstatr.c",
"reent/writer.c", "reent/timesr.c", "reent/unlinkr.c",
"reent/writer.c", "reent/timesr.c", "reent/unlinkr.c", "reent/renamer.c",
"search/qsort.c", "search/bsearch.c",
"signal/signal.c",
"sys/close.c", "sys/create.c", "sys/delete.c", "sys/errno.c", "sys/finfo.c",
@ -84,7 +84,7 @@ STDIO_SRCS = {
"tmpfile.c", "tmpnam.c", "ungetc.c", "vasniprintf.c", "vasnprintf.c",
"vdprintf.c", "vdiprintf.c", "vscanf.c", "vsprintf.c", "vsnprintf.c",
"vsscanf.c", "makebuf.c", "wsetup.c", "wbuf.c", "sccl.c", "siprintf.c",
"sniprintf.c", "snprintf.c", "sprintf.c", "sscanf.c"
"sniprintf.c", "snprintf.c", "sprintf.c", "sscanf.c", "rename.c"
}
MATH_SRCS = {

View File

@ -26,6 +26,6 @@ int read_file(const char *path, void *buff,
"addl $28, %%esp \n\t"
:"=a" (retval)
:"a"(path),"b"(buff),"c"(offset),"d"(count),"S"(reads));
return retval;
return retval == 6 ? 0 : retval;
};