Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2012 13:52:24 +0200
From:      Giovanni Trematerra <gianni@freebsd.org>
To:        Jung-uk Kim <jkim@freebsd.org>
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
Message-ID:  <CACfq090w3-iGT=aHREuipXUxmZSxXnGt4gDARFQbZfL5pSsgxQ@mail.gmail.com>
In-Reply-To: <201204162122.q3GLM23E051048@svn.freebsd.org>
References:  <201204162122.q3GLM23E051048@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 16, 2012 at 11:22 PM, Jung-uk Kim <jkim@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACfq090w3-iGT=aHREuipXUxmZSxXnGt4gDARFQbZfL5pSsgxQ>