summaryrefslogtreecommitdiffstats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorAleksandar Markovic2016-10-10 13:23:30 +0200
committerRiku Voipio2016-10-21 14:20:13 +0200
commit5a03cd009ae8d9c819c3f24f16695f8a334b8ad9 (patch)
treed86a30aef0ffce1c052152b0106ac6f61e44280d /linux-user/syscall.c
parentlinux-user: Add support for clock_adjtime() syscall (diff)
downloadqemu-5a03cd009ae8d9c819c3f24f16695f8a334b8ad9.tar.gz
qemu-5a03cd009ae8d9c819c3f24f16695f8a334b8ad9.tar.xz
qemu-5a03cd009ae8d9c819c3f24f16695f8a334b8ad9.zip
linux-user: Add support for syncfs() syscall
This patch implements Qemu user mode syncfs() syscall support. Syscall syncfs() syncs the filesystem containing file determined by the open file descriptor passed as the argument to syncfs(). The implementation consists of a straightforward invocation of host's syncfs(). Configure and strace support is included as well. Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 14929965ff..14c52072f9 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8090,6 +8090,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
sync();
ret = 0;
break;
+#if defined(TARGET_NR_syncfs) && defined(CONFIG_SYNCFS)
+ case TARGET_NR_syncfs:
+ ret = get_errno(syncfs(arg1));
+ break;
+#endif
case TARGET_NR_kill:
ret = get_errno(safe_kill(arg1, target_to_host_signal(arg2)));
break;