[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/13] linux-user: Fix strace of chmod() if mode == 0
From: |
Helge Deller |
Subject: |
[PATCH 08/13] linux-user: Fix strace of chmod() if mode == 0 |
Date: |
Fri, 26 Aug 2022 16:18:48 +0200 |
If the mode parameter of chmod() is zero, this value isn't shown
when stracing a program:
chmod("filename",)
This patch fixes it up to show the zero-value as well:
chmod("filename",000)
Signed-off-by: Helge Deller <deller@gmx.de>
---
linux-user/strace.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 86b2034c81..d1afa0e12a 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1504,6 +1504,11 @@ print_file_mode(abi_long mode, int last)
const char *sep = "";
const struct flags *m;
+ if (mode == 0) {
+ qemu_log("000%s", get_comma(last));
+ return;
+ }
+
for (m = &mode_flags[0]; m->f_string != NULL; m++) {
if ((m->f_value & mode) == m->f_value) {
qemu_log("%s%s", m->f_string, sep);
--
2.37.1
- Re: [PATCH 03/13] linux-user: Add faccessat2() syscall, (continued)
- [PATCH 10/13] linux-user: Add strace for clock_nanosleep(), Helge Deller, 2022/08/26
- [PATCH 01/13] linux-user: Add missing signals in strace output, Helge Deller, 2022/08/26
- [PATCH 11/13] linux-user: Show timespec on strace for futex(), Helge Deller, 2022/08/26
- [PATCH 08/13] linux-user: Fix strace of chmod() if mode == 0,
Helge Deller <=
- [PATCH 12/13] linux-user: Add close_range() syscall, Helge Deller, 2022/08/26
- [PATCH 02/13] linux-user: Add missing clock_gettime64() syscall strace, Helge Deller, 2022/08/26
- [PATCH 04/13] linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls, Helge Deller, 2022/08/26
- [PATCH 07/13] linux-user/hppa: Dump IIR on register dump, Helge Deller, 2022/08/26
- [PATCH 05/13] linux-user: Log failing executable in EXCP_DUMP(), Helge Deller, 2022/08/26
- [PATCH 09/13] linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch, Helge Deller, 2022/08/26
- [PATCH 13/13] linux-user: Add parameters of getrandom() syscall for strace, Helge Deller, 2022/08/26
- [PATCH 06/13] linux-user/hppa: Use EXCP_DUMP() to show enhanced debug info, Helge Deller, 2022/08/26