Skip to contentSkip to conversation

s390: __syscall_return error check.

PATCH New Martin Schwidefsky 1 participant 1 message Jun 14, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 8/24 s390: __syscall_return error check.

From: Heiko Carstens <[email protected]>

[S390] __syscall_return error check.

Fix __syscall_return macro: valid error numbers are in the range of -1..-4095.

---

 include/asm-s390/unistd.h |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)
include/asm-s390/unistd.h +1 -3
diff -urpN linux-2.6/include/asm-s390/unistd.h linux-2.6-patched/include/asm-s390/unistd.h
@@ -392,11 +392,9 @@
 
 #endif
 
-/* 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;				     \
 	}						     \