qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [5387] Add mincore syscall


From: Aurelien Jarno
Subject: [Qemu-devel] [5387] Add mincore syscall
Date: Wed, 01 Oct 2008 21:46:42 +0000

Revision: 5387
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5387
Author:   aurel32
Date:     2008-10-01 21:46:41 +0000 (Wed, 01 Oct 2008)

Log Message:
-----------
Add mincore syscall

Signed-off-by: Riku Voipio <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>

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

Modified: trunk/linux-user/syscall.c
===================================================================
--- trunk/linux-user/syscall.c  2008-10-01 21:46:32 UTC (rev 5386)
+++ trunk/linux-user/syscall.c  2008-10-01 21:46:41 UTC (rev 5387)
@@ -5576,7 +5576,19 @@
         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_arm_fadvise64_64
     case TARGET_NR_arm_fadvise64_64:






reply via email to

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