[klibc] klibc: s390 errno...

H. Peter Anvin hpa at zytor.com
Mon May 1 09:58:16 PDT 2006


I'm trying to do a full rebase (history clean) of the klibc kernel tree, 
and came across the following changesets between klibc 1.3.12 and .16:

--- a/usr/klibc/arch/s390/syscall.c
+++ b/usr/klibc/arch/s390/syscall.c
@@ -11,6 +11,6 @@ long int __syscall_common(long int err)
  {
         if ((unsigned long)(err) < (unsigned long)(-125))
                 return err;
-       errno = err;
+       errno = -err;
         return -1;
  }
diff --git a/usr/klibc/arch/s390x/syscall.c b/usr/klibc/arch/s390x/syscall.c
index 0d6b27e..c0f17c4 100644
--- a/usr/klibc/arch/s390x/syscall.c
+++ b/usr/klibc/arch/s390x/syscall.c
@@ -11,6 +11,6 @@ long int __syscall_common(long int err)
  {
         if ((unsigned long)(err) < (unsigned long)(-125))
                 return err;
-       errno = -err;
+       errno = err;
         return -1;
  }


The former is clearly right and the latter is clearly wrong.  Should I 
change the s390x version to match s390?

	-hpa



More information about the klibc mailing list