[klibc] klibc: s390 errno...
Heiko Carstens
heiko.carstens at de.ibm.com
Tue May 2 04:22:20 PDT 2006
Fix s390/s390x errno handling.
Signed-off-by: Heiko Carstens <heiko.carstens at de.ibm.com>
---
usr/klibc/arch/s390/syscall.c | 2 +-
usr/klibc/arch/s390x/syscall.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/usr/klibc/arch/s390/syscall.c b/usr/klibc/arch/s390/syscall.c
index 0d6b27e..baf473b 100644
--- a/usr/klibc/arch/s390/syscall.c
+++ b/usr/klibc/arch/s390/syscall.c
@@ -9,7 +9,7 @@ #include <errno.h>
long int __syscall_common(long int err)
{
- if ((unsigned long)(err) < (unsigned long)(-125))
+ if ((unsigned long)(err) < (unsigned long)(-4095))
return err;
errno = -err;
return -1;
diff --git a/usr/klibc/arch/s390x/syscall.c b/usr/klibc/arch/s390x/syscall.c
index c0f17c4..baf473b 100644
--- a/usr/klibc/arch/s390x/syscall.c
+++ b/usr/klibc/arch/s390x/syscall.c
@@ -9,8 +9,8 @@ #include <errno.h>
long int __syscall_common(long int err)
{
- if ((unsigned long)(err) < (unsigned long)(-125))
+ if ((unsigned long)(err) < (unsigned long)(-4095))
return err;
- errno = err;
+ errno = -err;
return -1;
}
More information about the klibc
mailing list