From 6002198839de241f5ea8a568a3624e80ebd5fe8c Mon Sep 17 00:00:00 2001 From: Jurica Stanojkovic Date: Tue, 31 May 2016 19:38:08 +0100 Subject: [PATCH] Fix mips/mipsel syscall wrappers to return correct error values. Forwarded: no Last-Update: 2012-09-24 Gbp-Pq: Name 00_arches_mips.patch --- src/syscall-mips.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/syscall-mips.h b/src/syscall-mips.h index 4142499..31de13a 100644 --- a/src/syscall-mips.h +++ b/src/syscall-mips.h @@ -76,7 +76,7 @@ type fname(atype a) \ \ if (__a3 == 0) \ return (type) __v0; \ - return (type) -1; \ + return (type) 0 - __v0; \ } #define io_syscall2(type,fname,sname,atype,a,btype,b) \ @@ -100,7 +100,7 @@ type fname(atype a, btype b) \ \ if (__a3 == 0) \ return (type) __v0; \ - return (type) -1; \ + return (type) 0 - __v0; \ } #define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ @@ -125,7 +125,7 @@ type fname(atype a, btype b, ctype c) \ \ if (__a3 == 0) \ return (type) __v0; \ - return (type) -1; \ + return (type) 0 - __v0; \ } #define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ @@ -150,7 +150,7 @@ type fname(atype a, btype b, ctype c, dtype d) \ \ if (__a3 == 0) \ return (type) __v0; \ - return (type) -1; \ + return (type) 0 - __v0; \ } #if (_MIPS_SIM == _MIPS_SIM_ABI32) @@ -186,7 +186,7 @@ type fname(atype a, btype b, ctype c, dtype d, etype e) \ \ if (__a3 == 0) \ return (type) __v0; \ - return (type) -1; \ + return (type) 0 - __v0; \ } #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */ @@ -216,7 +216,7 @@ type fname (atype a,btype b,ctype c,dtype d,etype e) \ \ if (__a3 == 0) \ return (type) __v0; \ - return (type) -1; \ + return (type) 0 - __v0; \ } #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ -- 2.30.2