[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 14/15] linux-user/strace: Fix print_syscall_err
From: |
Richard Henderson |
Subject: |
[PATCH v2 14/15] linux-user/strace: Fix print_syscall_err |
Date: |
Thu, 2 Dec 2021 12:48:59 -0800 |
Errors are not all negative numbers, but only the top 4k.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/strace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 2cdbf030ba..f235118fb6 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -684,12 +684,12 @@ print_ipc(void *cpu_env, const struct syscallname *name,
*/
static bool
-print_syscall_err(abi_long ret)
+print_syscall_err(abi_ulong ret)
{
const char *errstr;
qemu_log(" = ");
- if (ret < 0) {
+ if (ret > -4096) {
errstr = target_strerror(-ret);
if (errstr) {
qemu_log("-1 errno=%d (%s)", (int)-ret, errstr);
--
2.25.1
- [PATCH v2 00/15] target/m68k: Conditional traps + trap cleanup, Richard Henderson, 2021/12/02
- [PATCH v2 01/15] target/m68k: Raise the TRAPn exception with the correct pc, Richard Henderson, 2021/12/02
- [PATCH v2 04/15] linux-user/m68k: Handle EXCP_TRAP1 through EXCP_TRAP15, Richard Henderson, 2021/12/02
- [PATCH v2 02/15] target/m68k: Switch over exception type in m68k_interrupt_all, Richard Henderson, 2021/12/02
- [PATCH v2 09/15] target/m68k: Implement TRAPcc, Richard Henderson, 2021/12/02
- [PATCH v2 12/15] target/m68k: Fix stack frame for EXCP_ILLEGAL, Richard Henderson, 2021/12/02
- [PATCH v2 14/15] linux-user/strace: Fix print_syscall_err,
Richard Henderson <=
- [PATCH v2 13/15] tests/tcg/m68k: Add trap.c, Richard Henderson, 2021/12/02
- [PATCH v2 08/15] target/m68k: Fix address argument for EXCP_TRACE, Richard Henderson, 2021/12/02
- [PATCH v2 05/15] target/m68k: Remove retaddr in m68k_interrupt_all, Richard Henderson, 2021/12/02
- [PATCH v2 06/15] target/m68k: Fix address argument for EXCP_CHK, Richard Henderson, 2021/12/02