linux-user: fix socket() strace
PATCH 1/1 linux-user: fix socket() strace
print_socket_type() doesn't manage flags and the correct type cannot be displayed
Signed-off-by Laurent Vivier <[email protected]>
--- linux-user/strace.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
linux-user/strace.c +7 -1
@@ -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 ) { +gemu_log ("|SOCK_CLOEXEC" ); + } +if (type &TARGET_SOCK_NONBLOCK ) { +gemu_log ("|SOCK_NONBLOCK" ); + } } static void
Signature · 1 line
2.24.1