summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdike <jdike>2003-11-10 23:06:15 +0000
committerjdike <jdike>2003-11-10 23:06:15 +0000
commit80d67ec87b45db723eeec2f72b371a1726f6ce32 (patch)
tree11a4cacbaf6b4bb0d816d9e50109e38e39fa2e33
parent703e4e55cef6b3abd50938157c92e00a315916e6 (diff)
downloaduml-history-80d67ec87b45db723eeec2f72b371a1726f6ce32.tar.gz
Fixed a bug in the KERNEL_CALL error return.v_2_4_22_6
-rw-r--r--include/asm-um/unistd.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asm-um/unistd.h b/include/asm-um/unistd.h
index 6c5e913..8382e98 100644
--- a/include/asm-um/unistd.h
+++ b/include/asm-um/unistd.h
@@ -33,7 +33,10 @@ extern long sys_write(unsigned int fildes, char *buf, int len);
set_fs(KERNEL_DS); \
ret = sys(args); \
set_fs(fs); \
- return ret;
+ if (ret >= 0) \
+ return ret; \
+ errno = -(long)ret; \
+ return -1;
static inline long open(const char *pathname, int flags, int mode)
{