From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0uUl-0006JY-GM for qemu-devel@nongnu.org; Wed, 08 Jan 2014 09:52:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0uUh-0004f5-1Q for qemu-devel@nongnu.org; Wed, 08 Jan 2014 09:52:35 -0500 Received: from afflict.kos.to ([92.243.29.197]:41992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0uUg-0004en-N6 for qemu-devel@nongnu.org; Wed, 08 Jan 2014 09:52:30 -0500 Date: Wed, 8 Jan 2014 16:52:28 +0200 From: Riku Voipio Message-ID: <20140108145228.GA13893@afflict.kos.to> References: <52CAD6B6.7040701@dawncrow.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <52CAD6B6.7040701@dawncrow.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] linux-user: Support the accept4 socketcall List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?QW5kcsOp?= Hentschel Cc: QEMU Developers Hi, On Mon, Jan 06, 2014 at 05:15:50PM +0100, Andr=C3=A9 Hentschel wrote: > From: Andr=C3=A9 Hentschel > Cc: Riku Voipio > Signed-off-by: Andr=C3=A9 Hentschel > --- > See https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tre= e/include/uapi/linux/net.h for the value. Thanks, applied to the linux-user branch. I'm still checking if there are other linux-user patches that need submitting upstream before sending a pull request. Riku >=20 > linux-user/syscall.c | 16 ++++++++++++++++ > linux-user/syscall_defs.h | 1 + > 2 files changed, 17 insertions(+) >=20 > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index efd1453..1a848a6 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -2245,6 +2245,22 @@ static abi_long do_socketcall(int num, abi_ulong= vptr) > ret =3D do_accept4(sockfd, target_addr, target_addrlen, 0)= ; > } > break; > + case SOCKOP_accept4: > + { > + abi_ulong sockfd; > + abi_ulong target_addr, target_addrlen; > + int flags; > + > + if (get_user_ual(sockfd, vptr) > + || get_user_ual(target_addr, vptr + n) > + || get_user_ual(target_addrlen, vptr + 2 * n) > + || get_user_ual(flags, vptr + 3 * n)) { > + return -TARGET_EFAULT; > + } > + > + ret =3D do_accept4(sockfd, target_addr, target_addrlen, fl= ags); > + } > + break; > case SOCKOP_getsockname: > { > abi_ulong sockfd; > diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h > index cf08db5..ae30476 100644 > --- a/linux-user/syscall_defs.h > +++ b/linux-user/syscall_defs.h > @@ -27,6 +27,7 @@ > #define SOCKOP_getsockopt 15 > #define SOCKOP_sendmsg 16 > #define SOCKOP_recvmsg 17 > +#define SOCKOP_accept4 18 > =20 > #define IPCOP_semop 1 > #define IPCOP_semget 2 > --=20 > 1.8.1.2 >=20