aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-11-22 17:26:51 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-11-22 17:26:51 +0000
commit135b55aa99ca7f37fd23ce48bec64fe1d69498bf (patch)
tree1a637eb37977c24f982ac0145d910dcf07159c40
parent37dc5f0276c0f11fb6d407509a2e22e383647b8e (diff)
downloadChibiOS-135b55aa99ca7f37fd23ce48bec64fe1d69498bf.tar.gz
ChibiOS-135b55aa99ca7f37fd23ce48bec64fe1d69498bf.tar.bz2
ChibiOS-135b55aa99ca7f37fd23ce48bec64fe1d69498bf.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1318 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/various/syscalls.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/os/various/syscalls.c b/os/various/syscalls.c
index ccfda35d0..23bfea419 100644
--- a/os/various/syscalls.c
+++ b/os/various/syscalls.c
@@ -75,7 +75,7 @@ int _read_r(struct _reent *r, int file, char * ptr, int len)
(void)r;
#if defined(STDIN_SD)
if (!len || (file != 0)) {
- errno = EINVAL;
+ __errno_r(r) = EINVAL;
return -1;
}
*ptr++ = chIOGet(&STDOUT_SD);
@@ -86,7 +86,7 @@ int _read_r(struct _reent *r, int file, char * ptr, int len)
(void)file;
(void)ptr;
(void)len;
- errno = EINVAL;
+ __errno_r(r) = EINVAL;
return -1;
#endif
}
@@ -114,7 +114,7 @@ int _write_r(struct _reent *r, int file, char * ptr, int len)
(void)ptr;
#if defined(STDOUT_SD)
if (file != 1) {
- errno = EINVAL;
+ __errno_r(r) = EINVAL;
return -1;
}
n = len;
@@ -145,7 +145,7 @@ caddr_t _sbrk_r(struct _reent *r, int incr)
(void)r;
p = chCoreAlloc((size_t)incr);
if (p == NULL) {
- errno = ENOMEM;
+ __errno_r(r) = ENOMEM;
return (caddr_t)-1;
}
return (caddr_t)p;