diff options
author | Laurent Vivier <laurent@vivier.eu> | 2020-03-12 17:55:30 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2020-03-20 15:51:54 +0100 |
commit | 2039b1b0dc4a8b5325dcfb60c3f1fe4abf9720bb (patch) | |
tree | 65ed39d62e45b9b557880a046dd543745d9c90ee /linux-user | |
parent | 055d92f8673c9e2bc284a5976e69664c87f18cae (diff) |
linux-user: fix socket() strace
print_socket_type() doesn't manage flags and the correct type cannot
be displayed
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200312165530.53450-1-laurent@vivier.eu>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/strace.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/linux-user/strace.c b/linux-user/strace.c index 4f7130b2ff..69232f7e27 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 |