All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: chengang@emindsoft.com.cn, riku.voipio@iki.fi
Cc: peter.maydell@linaro.org, Chen Gang <gang.chen.5i5j@gmail.com>,
	qemu-devel@nongnu.org, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Use SOL_SOCKET instead of level for setsockopt()
Date: Mon, 11 Jan 2016 08:52:29 +0100	[thread overview]
Message-ID: <56935F3D.10502@vivier.eu> (raw)
In-Reply-To: <1452491930-10210-1-git-send-email-chengang@emindsoft.com.cn>



Le 11/01/2016 06:58, chengang@emindsoft.com.cn a écrit :
> From: Chen Gang <chengang@emindsoft.com.cn>
> 
> In this case, level is TARGET_SOL_SOCKET, but we need SOL_SOCKET for
> setsockopt().
> 
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  linux-user/syscall.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 95b1762..44485f2 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -1596,7 +1596,8 @@ set_timeout:
>  		addr_ifname = alloca(IFNAMSIZ);
>  		memcpy(addr_ifname, dev_ifname, optlen);
>  		addr_ifname[optlen] = 0;
> -		ret = get_errno(setsockopt(sockfd, level, optname, addr_ifname, optlen));
> +		ret = get_errno(setsockopt(sockfd, SOL_SOCKET, optname,
> +                                           addr_ifname, optlen));
>  		unlock_user (dev_ifname, optval_addr, 0);
>  		return ret;
>  	}
> 
Reviewed-by: Laurent Vivier <laurent@vivier.eu>

      reply	other threads:[~2016-01-11  7:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11  5:58 [Qemu-devel] [PATCH] linux-user/syscall.c: Use SOL_SOCKET instead of level for setsockopt() chengang
2016-01-11  7:52 ` Laurent Vivier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56935F3D.10502@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=chengang@emindsoft.com.cn \
    --cc=gang.chen.5i5j@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.