On 8 June 2016 at 21:24, Laurent Vivier <laur...@vivier.eu> wrote:
> From: Laurent Vivier <laur...@vivier.eu>
>
> Parameter of SO_RCVTIMEO and SO_SNDTIMEO is timeval, not int.
>
> To test this, you can use :
>
> QEMU_STRACE= ping localhost 2>&1 |grep TIMEO
> 568 setsockopt(3,SOL_SOCKET,SO_SNDTIMEO,{1,0},8) = 0
> 568 setsockopt(3,SOL_SOCKET,SO_RCVTIMEO,{1,0},8) = 0
>
> Signed-off-by: Laurent Vivier <laur...@vivier.eu>
> ---
>  linux-user/strace.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index a7b24e2..398e56e 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -1486,10 +1486,12 @@ print_optint:
>                  goto print_optint;
>              case TARGET_SO_RCVTIMEO:
>                  gemu_log("SO_RCVTIMEO,");
> -                goto print_optint;
> +                print_timeval(optval, 0);
> +                break;
>              case TARGET_SO_SNDTIMEO:
>                  gemu_log("SO_SNDTIMEO,");
> -                goto print_optint;
> +                print_timeval(optval, 0);
> +                break;
>              case TARGET_SO_ATTACH_FILTER: {
>                  struct target_sock_fprog *fprog;

You should just squash this into patch 1.

thanks
-- PMM

Reply via email to