Re: [Qemu-devel] [PATCH] linux-user: syscall: Add SO_LINGER for setsockopt

2016-01-08 Thread Laurent Vivier
Le 08/01/2016 03:03, cheng...@emindsoft.com.cn a écrit : > From: Chen Gang > > Just implement it according to the other features implementations. > > Signed-off-by: Chen Gang > --- > linux-user/syscall.c | 16 +++- >

Re: [Qemu-devel] [PATCH] linux-user: syscall: Add SO_LINGER for setsockopt

2016-01-08 Thread Laurent Vivier
Le 08/01/2016 10:45, Chen Gang a écrit : > > On 2016年01月08日 16:38, Laurent Vivier wrote: >> >>> +if (!lock_user_struct(VERIFY_READ, tlg, optval_addr, 1)) { >>> +return -TARGET_EFAULT; >>> +} >>> +__get_user(lg.l_onoff, >l_onoff); >>> +

Re: [Qemu-devel] [PATCH] linux-user: syscall: Add SO_LINGER for setsockopt

2016-01-08 Thread Chen Gang
On 2016年01月08日 17:57, Laurent Vivier wrote: > +return get_errno(setsockopt(sockfd, SOL_SOCKET, optname, + , sizeof(lg))); >>> >>> Why do you use "SOL_SOCKET" instead of "level" ? >>> >> >> At present, level is TARGET_SOL_SOCKET, but we need

Re: [Qemu-devel] [PATCH] linux-user: syscall: Add SO_LINGER for setsockopt

2016-01-08 Thread Chen Gang
On 2016年01月08日 16:38, Laurent Vivier wrote: > >> +if (!lock_user_struct(VERIFY_READ, tlg, optval_addr, 1)) { >> +return -TARGET_EFAULT; >> +} >> +__get_user(lg.l_onoff, >l_onoff); >> +__get_user(lg.l_linger, >l_linger); >> +

[Qemu-devel] [PATCH] linux-user: syscall: Add SO_LINGER for setsockopt

2016-01-07 Thread chengang
From: Chen Gang Just implement it according to the other features implementations. Signed-off-by: Chen Gang --- linux-user/syscall.c | 16 +++- linux-user/syscall_defs.h | 5 + 2 files changed, 20 insertions(+), 1