qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [7118] linux-user: prefer glibc over direct syscalls


From: Laurent Desnogues
Subject: Re: [Qemu-devel] [7118] linux-user: prefer glibc over direct syscalls
Date: Thu, 16 Apr 2009 17:25:25 +0200

On Wed, Apr 15, 2009 at 6:12 PM, Aurelien Jarno <address@hidden> 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 <address@hidden>
> Signed-off-by: Aurelien Jarno <address@hidden>
>
> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]