qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [5272] Fix pread() and pwrite() syscall on ARM EABI (Kirill


From: Andrzej Zaborowski
Subject: [Qemu-devel] [5272] Fix pread() and pwrite() syscall on ARM EABI (Kirill Shutemov).
Date: Sat, 20 Sep 2008 03:14:15 +0000

Revision: 5272
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5272
Author:   balrog
Date:     2008-09-20 03:14:14 +0000 (Sat, 20 Sep 2008)

Log Message:
-----------
Fix pread() and pwrite() syscall on ARM EABI (Kirill Shutemov).

pread() and pwrite() have differences in arguments between ARM EABI and
OABI.   

See arch/arm/kernel/entry-common.S in Linux kernel source for
additional information.
 
Signed-off-by: Kirill A. Shutemov <address@hidden>

Modified Paths:
--------------
    trunk/linux-user/syscall.c

Modified: trunk/linux-user/syscall.c
===================================================================
--- trunk/linux-user/syscall.c  2008-09-20 03:03:09 UTC (rev 5271)
+++ trunk/linux-user/syscall.c  2008-09-20 03:14:14 UTC (rev 5272)
@@ -5139,12 +5139,20 @@
 #endif
 #ifdef TARGET_NR_pread
     case TARGET_NR_pread:
+#ifdef TARGET_ARM
+        if (((CPUARMState *)cpu_env)->eabi)
+            arg4 = arg5;
+#endif
         if (!(p = lock_user(VERIFY_WRITE, arg2, arg3, 0)))
             goto efault;
         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
         if (!(p = lock_user(VERIFY_READ, arg2, arg3, 1)))
             goto efault;
         ret = get_errno(pwrite(arg1, p, arg3, arg4));






reply via email to

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