From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LuoTR-0005EX-8V for qemu-devel@nongnu.org; Fri, 17 Apr 2009 09:51:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LuoTQ-0005Dm-LI for qemu-devel@nongnu.org; Fri, 17 Apr 2009 09:51:20 -0400 Received: from [199.232.76.173] (port=43637 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LuoTQ-0005Db-87 for qemu-devel@nongnu.org; Fri, 17 Apr 2009 09:51:20 -0400 Received: from hall.aurel32.net ([88.191.82.174]:39800) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LuoTP-0002f9-JE for qemu-devel@nongnu.org; Fri, 17 Apr 2009 09:51:19 -0400 Date: Fri, 17 Apr 2009 15:51:15 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [7118] linux-user: prefer glibc over direct syscalls Message-ID: <20090417135115.GA32111@volta.aurel32.net> References: <761ea48b0904160825r22ee47b6n9747118244e4fc30@mail.gmail.com> <20090416164757.GA8341@kos.to> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20090416164757.GA8341@kos.to> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Riku Voipio Cc: qemu-devel@nongnu.org On Thu, Apr 16, 2009 at 07:47:57PM +0300, Riku Voipio wrote: > On Thu, Apr 16, 2009 at 05:25:25PM +0200, Laurent Desnogues wrote: > > > #if defined(TARGET_NR_inotify_rm_watch) && defined(__NR_inotify_rm_watch) > > > -_syscall2(int,sys_inotify_rm_watch,int,fd,uint32_t,wd) > > > +static int sys_inotify_rm_watch(int fd, int32_t wd) > > > +{ > > > + return (inotify_rm_watch(fd,pathname, wd)); > > > Isn't pathname spurious? > > It is broken. Try this. Thanks, applied. > From 448cfe737b614ec44a8c4a9a4d8c2542c3eac165 Mon Sep 17 00:00:00 2001 > From: Riku Voipio > Date: Thu, 16 Apr 2009 19:38:14 +0300 > Subject: linux-user: fix inotify syscalls > > Configure test was broken, so the breakage of the #ifdef'd > code was not noticed. > > Signed-off-by: Riku Voipio > --- > configure | 2 +- > linux-user/syscall.c | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/configure b/configure > index 5b705a0..251d271 100755 > --- a/configure > +++ b/configure > @@ -1200,7 +1200,7 @@ int > main(void) > { > /* try to start inotify */ > - return inotify_init(void); > + return inotify_init(); > } > EOF > if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 898f58c..c94efe6 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -480,6 +480,7 @@ _syscall4(int,sys_utimensat,int,dirfd,const char *,pathname, > #endif /* CONFIG_ATFILE */ > > #ifdef CONFIG_INOTIFY > +#include > > #if defined(TARGET_NR_inotify_init) && defined(__NR_inotify_init) > static int sys_inotify_init(void) > @@ -496,7 +497,7 @@ static int sys_inotify_add_watch(int fd,const char *pathname, int32_t mask) > #if defined(TARGET_NR_inotify_rm_watch) && defined(__NR_inotify_rm_watch) > static int sys_inotify_rm_watch(int fd, int32_t wd) > { > - return (inotify_rm_watch(fd,pathname, wd)); > + return (inotify_rm_watch(fd, wd)); > } > #endif > #else > -- > 1.6.2.1 > > > -- > "rm -rf" only sounds scary if you don't have backups > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net