[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [7118] linux-user: prefer glibc over direct syscalls
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [7118] linux-user: prefer glibc over direct syscalls |
Date: |
Fri, 17 Apr 2009 15:51:15 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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 <address@hidden>
> 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 <address@hidden>
> ---
> 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 <sys/inotify.h>
>
> #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
address@hidden http://www.aurel32.net