[S390] __syscall_return error check.
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 29 Jun 2006 12:57:25 +0000 (14:57 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 29 Jun 2006 12:57:25 +0000 (14:57 +0200)
Fix __syscall_return macro: valid error numbers are in the range
of -1..-4095.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
include/asm-s390/unistd.h

index e21443d..aa7a243 100644 (file)
 
 #ifdef __KERNEL__
 
-/* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
-
 #define __syscall_return(type, res)                         \
 do {                                                        \
-       if ((unsigned long)(res) >= (unsigned long)(-125)) { \
+       if ((unsigned long)(res) >= (unsigned long)(-4095)) {\
                errno = -(res);                              \
                res = -1;                                    \
        }                                                    \