qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Add mincore syscall


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH] Add mincore syscall
Date: Wed, 1 Oct 2008 23:49:56 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Applied, thanks.

On Fri, Sep 19, 2008 at 04:33:18PM +0300, Riku Voipio wrote:
> 
> Signed-off-by: Riku Voipio <address@hidden>
> ---
>  linux-user/syscall.c |   14 +++++++++++++-
>  1 files changed, 13 insertions(+), 1 deletions(-)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 8e6e735..cb75c94 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -5574,7 +5574,19 @@ abi_long do_syscall(void *cpu_env, int num, abi_long 
> arg1,
>          goto unimplemented;
>  #ifdef TARGET_NR_mincore
>      case TARGET_NR_mincore:
> -        goto unimplemented;
> +        {
> +            void *a;
> +            ret = -TARGET_EFAULT;
> +            if (!(a = lock_user(VERIFY_READ, arg1,arg2, 0)))
> +                goto efault;
> +            if (!(p = lock_user_string(arg3)))
> +                goto mincore_fail;
> +            ret = get_errno(mincore(a, arg2, p));
> +            unlock_user(p, arg3, ret);
> +            mincore_fail:
> +            unlock_user(a, arg1, 0);
> +        }
> +        break;
>  #endif
>  #ifdef TARGET_NR_fadvise64_64
>       case TARGET_NR_fadvise64_64:
> -- 
> 1.5.6.5
> 
> 
> -- 
> "rm -rf" only sounds scary if you don't have backups
> 
> 
> 

-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   address@hidden         | address@hidden
   `-    people.debian.org/~aurel32 | www.aurel32.net




reply via email to

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