005_arches_mips.patch (1659B)
1 Description: Fix mips/mipsel syscall wrappers to return correct error values. 2 Author: Jurica Stanojkovic <Jurica.Stanojkovic@rt-rk.com> 3 Forwarded: no 4 Last-Update: 2012-09-24 5 6 7 diff -upNr a/src/syscall-mips.h b/src/syscall-mips.h 8 --- a/src/syscall-mips.h 2012-09-13 11:46:35.652286733 +0200 9 +++ b/src/syscall-mips.h 2012-09-13 16:09:17.964407909 +0200 10 @@ -76,7 +76,7 @@ type fname(atype a) \ 11 \ 12 if (__a3 == 0) \ 13 return (type) __v0; \ 14 - return (type) -1; \ 15 + return (type) 0 - __v0; \ 16 } 17 18 #define io_syscall2(type,fname,sname,atype,a,btype,b) \ 19 @@ -100,7 +100,7 @@ type fname(atype a, btype b) \ 20 \ 21 if (__a3 == 0) \ 22 return (type) __v0; \ 23 - return (type) -1; \ 24 + return (type) 0 - __v0; \ 25 } 26 27 #define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ 28 @@ -125,7 +125,7 @@ type fname(atype a, btype b, ctype c) \ 29 \ 30 if (__a3 == 0) \ 31 return (type) __v0; \ 32 - return (type) -1; \ 33 + return (type) 0 - __v0; \ 34 } 35 36 #define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ 37 @@ -150,7 +150,7 @@ type fname(atype a, btype b, ctype c, dt 38 \ 39 if (__a3 == 0) \ 40 return (type) __v0; \ 41 - return (type) -1; \ 42 + return (type) 0 - __v0; \ 43 } 44 45 #if (_MIPS_SIM == _MIPS_SIM_ABI32) 46 @@ -186,7 +186,7 @@ type fname(atype a, btype b, ctype c, dt 47 \ 48 if (__a3 == 0) \ 49 return (type) __v0; \ 50 - return (type) -1; \ 51 + return (type) 0 - __v0; \ 52 } 53 54 #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */ 55 @@ -216,7 +216,7 @@ type fname (atype a,btype b,ctype c,dtyp 56 \ 57 if (__a3 == 0) \ 58 return (type) __v0; \ 59 - return (type) -1; \ 60 + return (type) 0 - __v0; \ 61 } 62 63 #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */