Skip to contentSkip to conversation

linux-user : add splice system call

PATCH In review vibi sreenivasan 1 participant 1 message May 24, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 linux-user : add splice system call

linux-user : add splice system call

---
 linux-user/syscall.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
linux-user/syscall.c +18 -0
index b58220d..dc726ad 100644
@@ -6580,6 +6580,24 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         break;
 #endif
 
+#ifdef TARGET_NR_splice
+    case TARGET_NR_splice:
+        {
+            long long int loff_in, loff_out;
+            long long int *ploff_in = NULL, *ploff_out = NULL;
+            if(arg2) {
+                get_user_u64(loff_in, arg2);
+                ploff_in = &loff_in;
+            }
+            if(arg4) {
+                get_user_u64(loff_out, arg2);
+                ploff_out = &loff_out;
+            }
+            ret = get_errno(splice(arg1, ploff_in, arg3, ploff_out, arg5, arg6));
+        }
+        break;
+#endif
+
     default:
     unimplemented:
         gemu_log("qemu: Unsupported syscall: %d\n", num);
Signature · 1 line
1.6.0