From owner-svn-src-head@FreeBSD.ORG Wed Apr 18 11:52:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84E591065672; Wed, 18 Apr 2012 11:52:25 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-qa0-f42.google.com (mail-qa0-f42.google.com [209.85.216.42]) by mx1.freebsd.org (Postfix) with ESMTP id E447B8FC12; Wed, 18 Apr 2012 11:52:24 +0000 (UTC) Received: by qafi31 with SMTP id i31so443358qaf.15 for ; Wed, 18 Apr 2012 04:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=csasRlL1/kHz4bu95JdDODXNE/3e/lGqPfXJZfkXZPI=; b=KQPkkj3yg+WT0v538zI9FDMkBVM2x/r3A+S7f+qcxMZhzumyUVfS53DLbQlTw2ySff r+udkbQtnedSLkeY2Ga5b+wQuxkj0PTNVJ52+1X0Yx4Rxg0clQf5CpMxScVmRzSyhfNm Exl06hiVOBz5c1VnE7igvrl+yT4+y9KJy39Dw6bOQCyzHnN1rbg3+tQVFfOPLS08wmBQ 1+9fsIfYRc6QHp1bc1ceY27IQjkQ84lFTfnQ8p1HC4zGKsq9CODwCg0295FiP97rZXv2 4d6vrXgxzoeamq7ajQ3fFh89P1QVFmzpZJ4l7Rpr2ZkYi2071Jzyjb87e54RMOz+6p+5 ctWA== MIME-Version: 1.0 Received: by 10.229.137.149 with SMTP id w21mr741411qct.27.1334749944162; Wed, 18 Apr 2012 04:52:24 -0700 (PDT) Sender: giovanni.trematerra@gmail.com Received: by 10.229.137.18 with HTTP; Wed, 18 Apr 2012 04:52:24 -0700 (PDT) In-Reply-To: <201204162122.q3GLM23E051048@svn.freebsd.org> References: <201204162122.q3GLM23E051048@svn.freebsd.org> Date: Wed, 18 Apr 2012 13:52:24 +0200 X-Google-Sender-Auth: QMLYRhqzO6ugetb5pKdEEWM-nDY Message-ID: From: Giovanni Trematerra To: Jung-uk Kim Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234352 - in head/sys: amd64/linux32 compat/linux i386/linux kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Apr 2012 11:52:25 -0000 On Mon, Apr 16, 2012 at 11:22 PM, Jung-uk Kim wrote: > Author: jkim > Date: Mon Apr 16 21:22:02 2012 > New Revision: 234352 > URL: http://svn.freebsd.org/changeset/base/234352 > > Log: > =A0- Implement pipe2 syscall for Linuxulator. =A0This syscall appeared in= 2.6.27 > =A0but GNU libc used it without checking its kernel version, e. g., Fedor= a 10. > =A0- Move pipe(2) implementation for Linuxulator from MD files to MI file= , > =A0sys/compat/linux/linux_file.c. =A0There is no MD code for this syscall= at all. > =A0- Correct an argument type for pipe() from l_ulong * to l_int *. =A0Pr= obably > =A0this was the source of MI/MD confusion. > > =A0Reviewed by: =A0emulation > > Modified: > =A0head/sys/amd64/linux32/linux32_dummy.c > =A0head/sys/amd64/linux32/linux32_machdep.c > =A0head/sys/amd64/linux32/syscalls.master > =A0head/sys/compat/linux/linux_file.c > =A0head/sys/i386/linux/linux_dummy.c > =A0head/sys/i386/linux/linux_machdep.c > =A0head/sys/i386/linux/syscalls.master > =A0head/sys/kern/sys_pipe.c > I don't think it's worth to change sys/kern/sys_pipe.c just to implement linux_pipe2 in linuxator. You can just revert the changes in sys_pipe.c and call kern_fcntl in linux_= pipe2 to set appropriate flags for the pipes after you created them with kern_pip= e. Please, take a look at this patch http://www.trematerra.net/patches/linux_pipe2.patch It's only test-compiled though. Thank you. -- Giovanni Trematerra