[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/37] linux-user: Fix strace of chmod() if mode == 0
From: |
Laurent Vivier |
Subject: |
[PULL 09/37] linux-user: Fix strace of chmod() if mode == 0 |
Date: |
Wed, 28 Sep 2022 22:27:09 +0200 |
From: Helge Deller <deller@gmx.de>
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>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220918194555.83535-8-deller@gmx.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/strace.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 5ac64df02b85..2f539845bb90 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
- [PULL 00/37] Linux user for 7.2 patches, Laurent Vivier, 2022/09/28
- [PULL 05/37] linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls, Laurent Vivier, 2022/09/28
- [PULL 02/37] linux-user: fix readlinkat handling with magic exe symlink, Laurent Vivier, 2022/09/28
- [PULL 03/37] linux-user: Add missing signals in strace output, Laurent Vivier, 2022/09/28
- [PULL 11/37] linux-user: Add strace for clock_nanosleep(), Laurent Vivier, 2022/09/28
- [PULL 01/37] linux-user: use 'max' instead of 'qemu32' / 'qemu64' by default, Laurent Vivier, 2022/09/28
- [PULL 04/37] linux-user: Add missing clock_gettime64() syscall strace, Laurent Vivier, 2022/09/28
- [PULL 07/37] linux-user/hppa: Use EXCP_DUMP() to show enhanced debug info, Laurent Vivier, 2022/09/28
- [PULL 09/37] linux-user: Fix strace of chmod() if mode == 0,
Laurent Vivier <=
- [PULL 06/37] linux-user: Log failing executable in EXCP_DUMP(), Laurent Vivier, 2022/09/28
- [PULL 10/37] linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch, Laurent Vivier, 2022/09/28
- [PULL 12/37] linux-user: Show timespec on strace for futex(), Laurent Vivier, 2022/09/28
- [PULL 08/37] linux-user/hppa: Dump IIR on register dump, Laurent Vivier, 2022/09/28
- [PULL 14/37] linux-user: Fix madvise(MADV_DONTNEED) on alpha, Laurent Vivier, 2022/09/28
- [PULL 18/37] linux-user: Fix TARGET_PROT_SEM for XTENSA, Laurent Vivier, 2022/09/28
- [PULL 13/37] linux-user: Provide MADV_* definitions, Laurent Vivier, 2022/09/28
- [PULL 15/37] linux-user: Implement stracing madvise(), Laurent Vivier, 2022/09/28
- [PULL 21/37] linux-user/hppa: Drop stack guard page on hppa target, Laurent Vivier, 2022/09/28
- [PULL 20/37] linux-user/hppa: Add signal trampoline for hppa target, Laurent Vivier, 2022/09/28