diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-07-20 12:38:26 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-07-20 12:38:26 -0400 |
commit | 1312930f9bdea47006a8a8c8509c0bed5cf69e85 (patch) | |
tree | 41d09b7fc04085f788cfb933edc2e1ea592af69c /arch | |
parent | f61be1f875a2758509d6e9e2cf6f1d9603b28b65 (diff) | |
download | musl-1312930f9bdea47006a8a8c8509c0bed5cf69e85.tar.gz musl-1312930f9bdea47006a8a8c8509c0bed5cf69e85.tar.bz2 musl-1312930f9bdea47006a8a8c8509c0bed5cf69e85.tar.xz musl-1312930f9bdea47006a8a8c8509c0bed5cf69e85.zip |
fix regression that negated some mips syscall error returns
due to what was essentially a copy and paste error, the changes made
in commit f61be1f875a2758509d6e9e2cf6f1d9603b28b65 caused syscalls
with 5 or 6 arguments (and syscalls with 2, 3, or 4 arguments when
compiled with clang compatibility) to negate the returned error code a
second time, breaking errno reporting.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/syscall_arch.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/syscall_arch.h b/arch/mips/syscall_arch.h index 1aa2c812..0f89a1c1 100644 --- a/arch/mips/syscall_arch.h +++ b/arch/mips/syscall_arch.h @@ -116,7 +116,7 @@ static inline long __syscall1(long n, long a) static inline long __syscall2(long n, long a, long b) { long r2 = (__syscall)(n, a, b); - if (r2 > -4096UL) return -r2; + if (r2 > -4096UL) return r2; if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b); return r2; } @@ -124,7 +124,7 @@ static inline long __syscall2(long n, long a, long b) static inline long __syscall3(long n, long a, long b, long c) { long r2 = (__syscall)(n, a, b, c); - if (r2 > -4096UL) return -r2; + if (r2 > -4096UL) return r2; if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b); return r2; } @@ -132,7 +132,7 @@ static inline long __syscall3(long n, long a, long b, long c) static inline long __syscall4(long n, long a, long b, long c, long d) { long r2 = (__syscall)(n, a, b, c, d); - if (r2 > -4096UL) return -r2; + if (r2 > -4096UL) return r2; if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b); if (n == SYS_fstatat) __stat_fix(c); return r2; @@ -143,7 +143,7 @@ static inline long __syscall4(long n, long a, long b, long c, long d) static inline long __syscall5(long n, long a, long b, long c, long d, long e) { long r2 = (__syscall)(n, a, b, c, d, e); - if (r2 > -4096UL) return -r2; + if (r2 > -4096UL) return r2; if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b); if (n == SYS_fstatat) __stat_fix(c); return r2; @@ -152,7 +152,7 @@ static inline long __syscall5(long n, long a, long b, long c, long d, long e) static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f) { long r2 = (__syscall)(n, a, b, c, d, e, f); - if (r2 > -4096UL) return -r2; + if (r2 > -4096UL) return r2; if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b); if (n == SYS_fstatat) __stat_fix(c); return r2; |