qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 16/19] linux-user: support the setns syscall


From: riku . voipio
Subject: [Qemu-devel] [PULL 16/19] linux-user: support the setns syscall
Date: Mon, 23 Jun 2014 16:26:31 +0300

From: Paul Burton <address@hidden>

Add support for the setns syscall, trivially passed through to the host.

Signed-off-by: Paul Burton <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
 linux-user/strace.list | 3 +++
 linux-user/syscall.c   | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/linux-user/strace.list b/linux-user/strace.list
index 147f579..d5b8033 100644
--- a/linux-user/strace.list
+++ b/linux-user/strace.list
@@ -1191,6 +1191,9 @@
 #ifdef TARGET_NR_set_mempolicy
 { TARGET_NR_set_mempolicy, "set_mempolicy" , NULL, NULL, NULL },
 #endif
+#ifdef TARGET_NR_setns
+{ TARGET_NR_setns, "setns" , NULL, NULL, NULL },
+#endif
 #ifdef TARGET_NR_setpgid
 { TARGET_NR_setpgid, "setpgid" , NULL, NULL, NULL },
 #endif
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 3fd0974..ecd5be9 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9611,6 +9611,12 @@ abi_long do_syscall(void *cpu_env, int num, abi_long 
arg1,
         break;
 #endif
 
+#ifdef TARGET_NR_setns
+    case TARGET_NR_setns:
+        ret = get_errno(setns(arg1, arg2));
+        break;
+#endif
+
     default:
     unimplemented:
         gemu_log("qemu: Unsupported syscall: %d\n", num);
-- 
2.0.0




reply via email to

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