From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C6yhn-0003HM-FO for qemu-devel@nongnu.org; Mon, 13 Sep 2004 17:49:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C6yhl-0003GP-OS for qemu-devel@nongnu.org; Mon, 13 Sep 2004 17:49:47 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C6yhl-0003GM-MO for qemu-devel@nongnu.org; Mon, 13 Sep 2004 17:49:45 -0400 Received: from [129.104.30.34] (helo=a.mx.polytechnique.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C6ybO-0001NI-7H for qemu-devel@nongnu.org; Mon, 13 Sep 2004 17:43:10 -0400 Received: from localhost (localhost [127.0.0.1]) by djali.m4x.org (Postfix) with ESMTP id 5897F33173 for ; Mon, 13 Sep 2004 23:43:09 +0200 (CEST) Received: from djali.m4x.org ([127.0.0.1]) by localhost (djali [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 15891-01 for ; Mon, 13 Sep 2004 23:43:09 +0200 (CEST) Received: from bellard.org (nas-cbv-5-213-228-50-7.dial.proxad.net [213.228.50.7]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTP id 188E3331BD for ; Mon, 13 Sep 2004 23:43:08 +0200 (CEST) Message-ID: <41460F97.4050801@bellard.org> Date: Mon, 13 Sep 2004 23:22:31 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] [patch] Make _sysctl less broken References: <200409111948.05182.paul@codesourcery.com> In-Reply-To: <200409111948.05182.paul@codesourcery.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Applied. Fabrice. Paul Brook wrote: > Qemu doesn't currently implement the _sysctl linux syscall, and complains > loudly when it is used. > > For some reason my Debian arm-linux chroot calls this syscall extensively, and > the "Unsupported syscall" errors were causing problems. > > The patch below makes it always return ENOTDIR. The sysctl names vary between > kernel versions, so user applications should already gracefully accept this. > > Paul > > Index: syscall.c > =================================================================== > RCS file: /cvsroot/qemu/qemu/linux-user/syscall.c,v > retrieving revision 1.50 > diff -u -p -r1.50 syscall.c > --- syscall.c 19 Jun 2004 16:59:03 -0000 1.50 > +++ syscall.c 11 Sep 2004 18:35:28 -0000 > @@ -2600,7 +2624,9 @@ long do_syscall(void *cpu_env, int num, > ret = get_errno(fdatasync(arg1)); > break; > case TARGET_NR__sysctl: > - goto unimplemented; > + /* We don't implement this, but ENODIR is always a safe > + return value. */ > + return -ENOTDIR; > case TARGET_NR_sched_setparam: > { > struct sched_param *target_schp = (void *)arg2; > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel > >