From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgeDf-0008CS-7L for qemu-devel@nongnu.org; Fri, 19 Sep 2008 07:32:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgeDd-0008CF-3P for qemu-devel@nongnu.org; Fri, 19 Sep 2008 07:32:14 -0400 Received: from [199.232.76.173] (port=49312 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgeDd-0008CC-0K for qemu-devel@nongnu.org; Fri, 19 Sep 2008 07:32:13 -0400 Received: from [84.20.150.76] (port=56491 helo=narury.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KgeDc-0003pH-Ks for qemu-devel@nongnu.org; Fri, 19 Sep 2008 07:32:12 -0400 Received: from kos.to (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by narury.org (Postfix) with ESMTP id 9D07F3274001 for ; Fri, 19 Sep 2008 14:32:05 +0300 (EEST) Date: Fri, 19 Sep 2008 14:32:05 +0300 From: Riku Voipio Subject: Re: [Qemu-devel] [PATCH] qdd fadvise64_64 syscall Message-ID: <20080919113205.GA9668@kos.to> References: <20080917194528.GA21187@kos.to> <20080919074922.GA18614@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080919074922.GA18614@localhost.localdomain> 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 On Fri, Sep 19, 2008 at 10:49:24AM +0300, Kirill A. Shutemov wrote: > On Wed, Sep 17, 2008 at 10:45:28PM +0300, Riku Voipio wrote: > > Since it's only a hint, we can just add a happy passwtrough. Also > > from scratchbox. > > > > Signed-off-by: Riku Voipio > > -- > > "rm -rf" only sounds scary if you don't have backups > > > Index: trunk/linux-user/arm/syscall_nr.h > > =================================================================== > > --- trunk.orig/linux-user/arm/syscall_nr.h 2008-09-07 02:32:28.000000000 +0300 > > +++ trunk/linux-user/arm/syscall_nr.h 2008-09-17 22:08:04.000000000 +0300 > > @@ -273,6 +273,7 @@ > > #define TARGET_NR_fstatfs64 267 > > #define TARGET_NR_tgkill 268 > > #define TARGET_NR_utimes 269 > > +#define TARGET_NR_fadvise64_64 270 > > #define TARGET_NR_arm_fadvise64_64 270 > > #define TARGET_NR_pciconfig_iobase 271 > > #define TARGET_NR_pciconfig_read 272 > It's wrong. > ARM doesn't provide fadvise64_64 syscall. It provides arm_fadvise64_64 > with different argument order. In this case, it doesn't matter since we don't use the arguments. Nevertheless it's decepting and I'll remove it. > > Index: trunk/linux-user/syscall.c > > =================================================================== > > --- trunk.orig/linux-user/syscall.c 2008-09-17 21:43:47.000000000 +0300 > > +++ trunk/linux-user/syscall.c 2008-09-17 22:08:51.000000000 +0300 > > @@ -5532,6 +5532,12 @@ > > } > > break; > > #endif > > +#ifdef TARGET_NR_fadvise64_64 > > + case TARGET_NR_fadvise64_64: > > + /* This is a hint, so ignoring and returning success is ok. */ > > + ret = get_errno(0); > > + break; > > +#endif > > #ifdef TARGET_NR_madvise > > case TARGET_NR_madvise: > > /* A straight passthrough may not be safe because qemu sometimes > Who is this realization make happy? EPARSE. -- "rm -rf" only sounds scary if you don't have backups