Message ID | mvmimxprmn8.fsf@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | linux-user: fix recvmsg emulation | expand |
On 12/02/2019 17:34, Andreas Schwab wrote: > Set msg_flags in the returned struct msghdr. > > Signed-off-by: Andreas Schwab <schwab@suse.de> > --- > linux-user/syscall.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 90bfda3563..b6b566a6fa 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -2797,6 +2797,7 @@ static abi_long do_sendrecvmsg_locked(int fd, struct target_msghdr *msgp, > } > if (!is_error(ret)) { > msgp->msg_namelen = tswap32(msg.msg_namelen); > + msgp->msg_flags = tswap32(msg.msg_flags); > if (msg.msg_name != NULL && msg.msg_name != (void *)-1) { > ret = host_to_target_sockaddr(tswapal(msgp->msg_name), > msg.msg_name, msg.msg_namelen); > Reviewed-by: Laurent Vivier <laurent@vivier.eu>
On 2/12/19 5:34 PM, Andreas Schwab wrote: > Set msg_flags in the returned struct msghdr. > > Signed-off-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > linux-user/syscall.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 90bfda3563..b6b566a6fa 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -2797,6 +2797,7 @@ static abi_long do_sendrecvmsg_locked(int fd, struct target_msghdr *msgp, > } > if (!is_error(ret)) { > msgp->msg_namelen = tswap32(msg.msg_namelen); > + msgp->msg_flags = tswap32(msg.msg_flags); > if (msg.msg_name != NULL && msg.msg_name != (void *)-1) { > ret = host_to_target_sockaddr(tswapal(msgp->msg_name), > msg.msg_name, msg.msg_namelen); >
On 12/02/2019 17:34, Andreas Schwab wrote: > Set msg_flags in the returned struct msghdr. > > Signed-off-by: Andreas Schwab <schwab@suse.de> > --- > linux-user/syscall.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 90bfda3563..b6b566a6fa 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -2797,6 +2797,7 @@ static abi_long do_sendrecvmsg_locked(int fd, struct target_msghdr *msgp, > } > if (!is_error(ret)) { > msgp->msg_namelen = tswap32(msg.msg_namelen); > + msgp->msg_flags = tswap32(msg.msg_flags); > if (msg.msg_name != NULL && msg.msg_name != (void *)-1) { > ret = host_to_target_sockaddr(tswapal(msgp->msg_name), > msg.msg_name, msg.msg_namelen); > Applied to my linux-user branch. Thanks, Laurent
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 90bfda3563..b6b566a6fa 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2797,6 +2797,7 @@ static abi_long do_sendrecvmsg_locked(int fd, struct target_msghdr *msgp, } if (!is_error(ret)) { msgp->msg_namelen = tswap32(msg.msg_namelen); + msgp->msg_flags = tswap32(msg.msg_flags); if (msg.msg_name != NULL && msg.msg_name != (void *)-1) { ret = host_to_target_sockaddr(tswapal(msgp->msg_name), msg.msg_name, msg.msg_namelen);
Set msg_flags in the returned struct msghdr. Signed-off-by: Andreas Schwab <schwab@suse.de> --- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+)