From: Aurelien Jarno <aurelien@aurel32.net>
To: Riku Voipio <riku.voipio@iki.fi>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [7118] linux-user: prefer glibc over direct syscalls
Date: Fri, 17 Apr 2009 15:51:15 +0200 [thread overview]
Message-ID: <20090417135115.GA32111@volta.aurel32.net> (raw)
In-Reply-To: <20090416164757.GA8341@kos.to>
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 <riku.voipio@iki.fi>
> 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 <riku.voipio@iki.fi>
> ---
> 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
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2009-04-17 13:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-15 16:12 [Qemu-devel] [7118] linux-user: prefer glibc over direct syscalls Aurelien Jarno
2009-04-15 19:21 ` Stefan Weil
2009-04-15 19:48 ` Aurelien Jarno
2009-04-16 15:25 ` Laurent Desnogues
2009-04-16 16:47 ` Riku Voipio
2009-04-17 13:51 ` Aurelien Jarno [this message]
2009-04-17 0:16 ` Paul Brook
2009-04-17 8:03 ` Riku Voipio
2009-04-21 7:56 ` Laurent Desnogues
2009-04-21 8:36 ` Arnaud Patard
2009-04-21 8:35 ` Laurent Desnogues
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090417135115.GA32111@volta.aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.