All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <k.shutemov@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] ARM EABI pread/pwrite fix
Date: Sun, 8 Apr 2007 07:41:25 +0300	[thread overview]
Message-ID: <20070408044125.GA31440@localhost.localdomain> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 229 bytes --]

Add ARM EABI syscall interface support for pread/pwrite. Patch in the=20
atachement.

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

[-- Attachment #1.2: pread-pwrite-arm-eabi.patch --]
[-- Type: text/plain, Size: 944 bytes --]

diff --git a/qemu.spec b/qemu.spec
diff --git a/qemu/linux-user/syscall.c b/qemu/linux-user/syscall.c
index 33778aa..8b0f845 100644
--- a/qemu/linux-user/syscall.c
+++ b/qemu/linux-user/syscall.c
@@ -3528,12 +3528,24 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
         break;
 #ifdef TARGET_NR_pread
     case TARGET_NR_pread:
+#ifdef TARGET_ARM
+        if (((CPUARMState *)cpu_env)->eabi)
+        {
+            arg4 = arg5;
+        }
+#endif
         page_unprotect_range(arg2, arg3);
         p = lock_user(arg2, arg3, 0);
         ret = get_errno(pread(arg1, p, arg3, arg4));
         unlock_user(p, arg2, ret);
         break;
     case TARGET_NR_pwrite:
+#ifdef TARGET_ARM
+        if (((CPUARMState *)cpu_env)->eabi)
+        {
+            arg4 = arg5;
+        }
+#endif
         p = lock_user(arg2, arg3, 1);
         ret = get_errno(pwrite(arg1, p, arg3, arg4));
         unlock_user(p, arg2, 0);

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

                 reply	other threads:[~2007-04-08  4:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20070408044125.GA31440@localhost.localdomain \
    --to=k.shutemov@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 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.