From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [7118] linux-user: prefer glibc over direct syscalls
Date: Thu, 16 Apr 2009 17:25:25 +0200 [thread overview]
Message-ID: <761ea48b0904160825r22ee47b6n9747118244e4fc30@mail.gmail.com> (raw)
In-Reply-To: <E1Lu7ig-0007Ez-1h@cvs.savannah.gnu.org>
On Wed, Apr 15, 2009 at 6:12 PM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> Revision: 7118
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7118
> Author: aurel32
> Date: 2009-04-15 16:12:13 +0000 (Wed, 15 Apr 2009)
> Log Message:
> -----------
> linux-user: prefer glibc over direct syscalls
>
> The openat/*at syscalls are incredibly common with modern coreutils,
> calling them directly via syscalls breaks for example fakeroot. Use
> glibc stubs whenever directly available and provide old syscall
> calling for people still using older libc.
>
> Patch originally from Mika Westerberg, Adapted to
> apply to current trunk and cleaned up by Riku Voipio.
>
> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>
> Modified Paths:
> --------------
> trunk/configure
> trunk/linux-user/syscall.c
[...]
> Modified: trunk/linux-user/syscall.c
> ===================================================================
> --- trunk/linux-user/syscall.c 2009-04-15 16:12:06 UTC (rev 7117)
> +++ trunk/linux-user/syscall.c 2009-04-15 16:12:13 UTC (rev 7118)
[...]
> @@ -285,22 +482,37 @@
> _syscall4(int,sys_utimensat,int,dirfd,const char *,pathname,
> const struct timespec *,tsp,int,flags)
> #endif
> +
> +#endif /* CONFIG_ATFILE */
> +
> +#ifdef CONFIG_INOTIFY
> +
> #if defined(TARGET_NR_inotify_init) && defined(__NR_inotify_init)
> -_syscall0(int,sys_inotify_init)
> +static int sys_inotify_init(void)
> +{
> + return (inotify_init());
> +}
> #endif
> #if defined(TARGET_NR_inotify_add_watch) && defined(__NR_inotify_add_watch)
> -_syscall3(int,sys_inotify_add_watch,int,fd,const char *,pathname,uint32_t,mask)
> +static int sys_inotify_add_watch(int fd,const char *pathname, int32_t mask)
> +{
> + return (inotify_add_watch(fd, pathname, mask));
> +}
> #endif
> #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?
Laurent
next prev parent reply other threads:[~2009-04-16 15:25 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 [this message]
2009-04-16 16:47 ` Riku Voipio
2009-04-17 13:51 ` Aurelien Jarno
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=761ea48b0904160825r22ee47b6n9747118244e4fc30@mail.gmail.com \
--to=laurent.desnogues@gmail.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).