[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 07/12] linux-user: Fix strace of chmod() if mode == 0
From: |
Helge Deller |
Subject: |
[PATCH v3 07/12] linux-user: Fix strace of chmod() if mode == 0 |
Date: |
Sun, 18 Sep 2022 21:45:50 +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 5ac64df02b..2f539845bb 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1505,6 +1505,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.3
- [PATCH v3 12/12] linux-user: Add parameters of getrandom() syscall for strace, (continued)
- [PATCH v3 12/12] linux-user: Add parameters of getrandom() syscall for strace, Helge Deller, 2022/09/18
- [PATCH v3 04/12] linux-user: Log failing executable in EXCP_DUMP(), Helge Deller, 2022/09/18
- [PATCH v3 09/12] linux-user: Add strace for clock_nanosleep(), Helge Deller, 2022/09/18
- [PATCH v3 03/12] linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls, Helge Deller, 2022/09/18
- [PATCH v3 08/12] linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch, Helge Deller, 2022/09/18
- [PATCH v3 07/12] linux-user: Fix strace of chmod() if mode == 0,
Helge Deller <=
- [PATCH v3 01/12] linux-user: Add missing signals in strace output, Helge Deller, 2022/09/18
- Re: [PATCH v3 00/12] linux-user: Add more syscalls, enhance tracing & logging enhancements, Laurent Vivier, 2022/09/27