From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzlHk-0005Rp-1M for qemu-devel@nongnu.org; Thu, 18 Jul 2013 06:18:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzlHi-000737-8N for qemu-devel@nongnu.org; Thu, 18 Jul 2013 06:18:07 -0400 Received: from mail-la0-f44.google.com ([209.85.215.44]:37696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzlHi-00072w-1W for qemu-devel@nongnu.org; Thu, 18 Jul 2013 06:18:06 -0400 Received: by mail-la0-f44.google.com with SMTP id er20so2353471lab.3 for ; Thu, 18 Jul 2013 03:18:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1373128788-16756-1-git-send-email-peter.maydell@linaro.org> References: <1373128788-16756-1-git-send-email-peter.maydell@linaro.org> From: Peter Maydell Date: Thu, 18 Jul 2013 11:17:44 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] linux-user: Fix pipe syscall return for SPARC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl , Riku Voipio , patches@linaro.org Ping? thanks -- PMM On 6 July 2013 17:39, Peter Maydell wrote: > SPARC is one of the CPUs which has a funny syscall ABI for the > pipe syscall; add it to the set of special cases in do_pipe(). > > Signed-off-by: Peter Maydell > --- > bash is much more useful with this patch -- without it, it will > close() stdin instead of one end of its pipe to a child process, > so after the first time you run a program bash will exit... > > It's this kind of "basic stuff doesn't work" that makes me > happier about being a bit cavalier with code cleanups, > enabling NPTL, etc for some of the minor target archs in > linux-user -- it's clear that some of them have simply never > been tested for anything more serious than "run some trivial > binary"... > > linux-user/syscall.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index cdd0c28..aea9be4 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -1030,6 +1030,9 @@ static abi_long do_pipe(void *cpu_env, abi_ulong pipedes, > #elif defined(TARGET_SH4) > ((CPUSH4State*)cpu_env)->gregs[1] = host_pipe[1]; > return host_pipe[0]; > +#elif defined(TARGET_SPARC) > + ((CPUSPARCState*)cpu_env)->regwptr[1] = host_pipe[1]; > + return host_pipe[0]; > #endif > } > > -- > 1.7.9.5 > >