summaryrefslogtreecommitdiffstats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorRiku Voipio2014-08-12 14:58:57 +0200
committerRiku Voipio2014-08-22 14:06:34 +0200
commit9af5c906d189d8f4aae902d75567639d2a8f4e22 (patch)
tree46ddbea715bab06eba0eb1063f8565284f8420ef /linux-user/syscall.c
parentlinux-user: support ioprio_{get, set} syscalls (diff)
downloadqemu-9af5c906d189d8f4aae902d75567639d2a8f4e22.tar.gz
qemu-9af5c906d189d8f4aae902d75567639d2a8f4e22.tar.xz
qemu-9af5c906d189d8f4aae902d75567639d2a8f4e22.zip
linux-user: add setns and unshare
Add support for the setns and unshare syscalls, trivially passed through to the host. Based on patches by Paul Burton, added configure check. Signed-off-by: Paul Burton <paul@archlinuxmips.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f1c182bbae..dae10afcb8 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9610,6 +9610,17 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
break;
#endif
+#if defined(TARGET_NR_setns) && defined(CONFIG_SETNS)
+ case TARGET_NR_setns:
+ ret = get_errno(setns(arg1, arg2));
+ break;
+#endif
+#if defined(TARGET_NR_unshare) && defined(CONFIG_SETNS)
+ case TARGET_NR_unshare:
+ ret = get_errno(unshare(arg1));
+ break;
+#endif
+
default:
unimplemented:
gemu_log("qemu: Unsupported syscall: %d\n", num);