[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 15/17] linux-user/strace: Fix print_syscall_err
From: |
Richard Henderson |
Subject: |
[PATCH v3 15/17] linux-user/strace: Fix print_syscall_err |
Date: |
Tue, 15 Mar 2022 22:58:38 -0700 |
Errors are not all negative numbers, but only the top 4k.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
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 v3 05/17] target/m68k: Remove retaddr in m68k_interrupt_all, (continued)
- [PATCH v3 05/17] target/m68k: Remove retaddr in m68k_interrupt_all, Richard Henderson, 2022/03/16
- [PATCH v3 07/17] target/m68k: Fix pc, c flag, and address argument for EXCP_DIV0, Richard Henderson, 2022/03/16
- [PATCH v3 08/17] target/m68k: Fix address argument for EXCP_TRACE, Richard Henderson, 2022/03/16
- [PATCH v3 10/17] target/m68k: Implement TRAPcc, Richard Henderson, 2022/03/16
- [PATCH v3 09/17] target/m68k: Fix stack frame for EXCP_ILLEGAL, Richard Henderson, 2022/03/16
- [PATCH v3 11/17] target/m68k: Implement TPF in terms of TRAPcc, Richard Henderson, 2022/03/16
- [PATCH v3 12/17] target/m68k: Implement TRAPV, Richard Henderson, 2022/03/16
- [PATCH v3 13/17] target/m68k: Implement FTRAPcc, Richard Henderson, 2022/03/16
- [PATCH v3 14/17] tests/tcg/m68k: Add trap.c, Richard Henderson, 2022/03/16
- [PATCH v3 16/17] linux-user/strace: Adjust get_thread_area for m68k, Richard Henderson, 2022/03/16
- [PATCH v3 15/17] linux-user/strace: Fix print_syscall_err,
Richard Henderson <=
- [PATCH v3 17/17] target/m68k: Mark helper_raise_exception as noreturn, Richard Henderson, 2022/03/16