All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qdd fadvise64_64 syscall
Date: Fri, 19 Sep 2008 10:49:24 +0300	[thread overview]
Message-ID: <20080919074922.GA18614@localhost.localdomain> (raw)
In-Reply-To: <20080917194528.GA21187@kos.to>

[-- Attachment #1: Type: text/plain, Size: 1773 bytes --]

On Wed, Sep 17, 2008 at 10:45:28PM +0300, Riku Voipio wrote:
> Since it's only a hint, we can just add a happy passwtrough. Also
> from scratchbox.
> 
> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
> -- 
> "rm -rf" only sounds scary if you don't have backups

> Index: trunk/linux-user/arm/syscall_nr.h
> ===================================================================
> --- trunk.orig/linux-user/arm/syscall_nr.h	2008-09-07 02:32:28.000000000 +0300
> +++ trunk/linux-user/arm/syscall_nr.h	2008-09-17 22:08:04.000000000 +0300
> @@ -273,6 +273,7 @@
>  #define TARGET_NR_fstatfs64			267
>  #define TARGET_NR_tgkill			268
>  #define TARGET_NR_utimes			269
> +#define TARGET_NR_fadvise64_64			270
>  #define TARGET_NR_arm_fadvise64_64		270
>  #define TARGET_NR_pciconfig_iobase		271
>  #define TARGET_NR_pciconfig_read		272

It's wrong.
ARM doesn't provide fadvise64_64 syscall. It provides arm_fadvise64_64
with different argument order.

> Index: trunk/linux-user/syscall.c
> ===================================================================
> --- trunk.orig/linux-user/syscall.c	2008-09-17 21:43:47.000000000 +0300
> +++ trunk/linux-user/syscall.c	2008-09-17 22:08:51.000000000 +0300
> @@ -5532,6 +5532,12 @@
>  		}
>          break;
>  #endif
> +#ifdef TARGET_NR_fadvise64_64
> +     case TARGET_NR_fadvise64_64:
> +        /* This is a hint, so ignoring and returning success is ok.  */
> +        ret = get_errno(0);
> +        break;
> +#endif
>  #ifdef TARGET_NR_madvise
>      case TARGET_NR_madvise:
>          /* A straight passthrough may not be safe because qemu sometimes

Who is this realization make happy?

-- 
Regards,  Kirill A. Shutemov
 + Belarus, Minsk
 + ALT Linux Team, http://www.altlinux.com/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-09-19  7:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-17 19:45 [Qemu-devel] [PATCH] qdd fadvise64_64 syscall Riku Voipio
2008-09-19  7:49 ` Kirill A. Shutemov [this message]
2008-09-19 11:32   ` Riku Voipio
2008-09-19 11:42     ` Kirill A. Shutemov

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=20080919074922.GA18614@localhost.localdomain \
    --to=kirill@shutemov.name \
    --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 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.