[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 8/9] linux-user/strace: Let print_sockaddr() have a 'last'
From: |
Laurent Vivier |
Subject: |
Re: [PATCH v8 8/9] linux-user/strace: Let print_sockaddr() have a 'last' argument |
Date: |
Mon, 21 Oct 2019 14:54:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 |
Le 21/10/2019 à 13:48, Philippe Mathieu-Daudé a écrit :
> If the format is not the syscall last argument, a comma is append.
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> Reviewed-by: Laurent Vivier <address@hidden>
> ---
> v8: do not name prototype arguments
>
> checkpatch error:
> ERROR: storage class should be at the beginning of the declaration
> #10: FILE: linux-user/strace.c:70:
> +UNUSED static void print_sockaddr(abi_ulong, abi_long, int);
> ---
> linux-user/strace.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index cd92c77d33..3d4d684450 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -67,7 +67,7 @@ UNUSED static void print_timeval(abi_ulong, int);
> UNUSED static void print_timezone(abi_ulong, int);
> UNUSED static void print_number(abi_long, int);
> UNUSED static void print_signal(abi_ulong, int);
> -UNUSED static void print_sockaddr(abi_ulong addr, abi_long addrlen);
> +UNUSED static void print_sockaddr(abi_ulong, abi_long, int);
> UNUSED static void print_socket_domain(int domain);
> UNUSED static void print_socket_type(int type);
> UNUSED static void print_socket_protocol(int domain, int type, int protocol);
> @@ -336,7 +336,7 @@ static void print_siginfo(const target_siginfo_t *tinfo)
> }
>
> static void
> -print_sockaddr(abi_ulong addr, abi_long addrlen)
> +print_sockaddr(abi_ulong addr, abi_long addrlen, int last)
> {
> struct target_sockaddr *sa;
> int i;
> @@ -418,7 +418,7 @@ print_sockaddr(abi_ulong addr, abi_long addrlen)
> } else {
> print_raw_param("0x"TARGET_ABI_FMT_lx, addr, 0);
> }
> - gemu_log(", "TARGET_ABI_FMT_ld, addrlen);
> + gemu_log(", "TARGET_ABI_FMT_ld"%s", addrlen, get_comma(last));
> }
>
> static void
> @@ -1751,7 +1751,7 @@ static void do_print_sockaddr(const char *name,
> abi_long arg1)
>
> gemu_log("%s(", name);
> print_sockfd(sockfd, 0);
> - print_sockaddr(addr, addrlen);
> + print_sockaddr(addr, addrlen, 0);
> gemu_log(")");
> }
>
> @@ -1821,7 +1821,7 @@ static void do_print_msgaddr(const char *name, abi_long
> arg1)
> print_buf(msg, len, 0);
> print_raw_param(TARGET_ABI_FMT_ld, len, 0);
> print_flags(msg_flags, flags, 0);
> - print_sockaddr(addr, addrlen);
> + print_sockaddr(addr, addrlen, 0);
> gemu_log(")");
> }
>
>
Reviewed-by: Laurent Vivier <address@hidden>
- [PATCH v8 3/9] linux-user/strace: Improve settimeofday(), (continued)
- [PATCH v8 3/9] linux-user/strace: Improve settimeofday(), Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v8 5/9] linux-user/strace: Dump AF_NETLINK sockaddr content, Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v8 9/9] linux-user/syscall: Align target_sockaddr fields using ABI types, Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v8 6/9] linux-user/strace: Add print_sockfd(), Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v8 8/9] linux-user/strace: Let print_sockaddr() have a 'last' argument, Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v8 4/9] linux-user/syscall: Introduce target_sockaddr_nl, Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v8 2/9] linux-user/strace: Add print_timezone(), Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v8 7/9] linux-user/strace: Improve bind() output, Philippe Mathieu-Daudé, 2019/10/21
- Re: [PATCH v8 0/9] linux-user: strace improvements, no-reply, 2019/10/21