Skip to content

Commit

Permalink
[S390] __syscall_return error check.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jun 29, 2006
1 parent 40154b8 commit 4980082
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/asm-s390/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,9 @@

#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; \
} \
Expand Down

0 comments on commit 4980082

Please sign in to comment.