[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 08/16] linux-user: fix socket() strace
From: |
Laurent Vivier |
Subject: |
[PULL v3 08/16] linux-user: fix socket() strace |
Date: |
Thu, 19 Mar 2020 10:26:19 +0100 |
print_socket_type() doesn't manage flags and the correct type cannot
be displayed
Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
linux-user/strace.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 4f7130b2ff63..69232f7e27b8 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -444,7 +444,7 @@ print_socket_domain(int domain)
static void
print_socket_type(int type)
{
- switch (type) {
+ switch (type & TARGET_SOCK_TYPE_MASK) {
case TARGET_SOCK_DGRAM:
qemu_log("SOCK_DGRAM");
break;
@@ -464,6 +464,12 @@ print_socket_type(int type)
qemu_log("SOCK_PACKET");
break;
}
+ if (type & TARGET_SOCK_CLOEXEC) {
+ qemu_log("|SOCK_CLOEXEC");
+ }
+ if (type & TARGET_SOCK_NONBLOCK) {
+ qemu_log("|SOCK_NONBLOCK");
+ }
}
static void
--
2.25.1
- [PULL v3 00/16] Linux user for 5.0 patches, Laurent Vivier, 2020/03/19
- [PULL v3 04/16] linux-user: Add x86_64 vsyscall page to /proc/self/maps, Laurent Vivier, 2020/03/19
- [PULL v3 07/16] linux-user: do prlimit selectively, Laurent Vivier, 2020/03/19
- [PULL v3 03/16] linux-user/i386: Emulate x86_64 vsyscalls, Laurent Vivier, 2020/03/19
- [PULL v3 09/16] linux-user: Update TASK_UNMAPPED_BASE for aarch64, Laurent Vivier, 2020/03/19
- [PULL v3 06/16] linux-user: Add AT_EXECFN auxval, Laurent Vivier, 2020/03/19
- [PULL v3 05/16] linux-user: Flush out implementation of gettimeofday, Laurent Vivier, 2020/03/19
- [PULL v3 01/16] target/i386: Renumber EXCP_SYSCALL, Laurent Vivier, 2020/03/19
- [PULL v3 08/16] linux-user: fix socket() strace,
Laurent Vivier <=
- [PULL v3 11/16] linux-user/syscall: Add support for clock_gettime64/clock_settime64, Laurent Vivier, 2020/03/19
- [PULL v3 02/16] linux-user/i386: Split out gen_signal, Laurent Vivier, 2020/03/19
- [PULL v3 16/16] linux-user, openrisc: sync syscall numbers with kernel v5.5, Laurent Vivier, 2020/03/19
- [PULL v3 13/16] scripts: add a script to generate syscall_nr.h, Laurent Vivier, 2020/03/19
- [PULL v3 12/16] linux-user/riscv: Update the syscall_nr's to the 5.5 kernel, Laurent Vivier, 2020/03/19
- [PULL v3 10/16] linux-user: Protect more syscalls, Laurent Vivier, 2020/03/19
- [PULL v3 14/16] linux-user, aarch64: sync syscall numbers with kernel v5.5, Laurent Vivier, 2020/03/19
- [PULL v3 15/16] linux-user, nios2: sync syscall numbers with kernel v5.5, Laurent Vivier, 2020/03/19
- Re: [PULL v3 00/16] Linux user for 5.0 patches, Peter Maydell, 2020/03/19