diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2011-01-06 11:05:10 +0000 |
---|---|---|
committer | Riku Voipio <riku.voipio@iki.fi> | 2011-01-07 17:13:22 +0200 |
commit | c727f47d59641c43ce171126232fd8049296adf6 (patch) | |
tree | fce1c2a0ebc893077b5ac9ca851d2f31f1f0566c /linux-user/syscall.c | |
parent | 2a704b137f1acfbd972aa6e9f031c5015c7e28cb (diff) | |
download | qemu-c727f47d59641c43ce171126232fd8049296adf6.zip qemu-c727f47d59641c43ce171126232fd8049296adf6.tar.gz qemu-c727f47d59641c43ce171126232fd8049296adf6.tar.bz2 |
linux-user: Implement sync_file_range{,2} syscalls
Implement the missing syscalls sync_file_range and sync_file_range2.
The latter in particular is used by newer versions of apt on Ubuntu
for ARM.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index c3e8706..1939a5f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7365,6 +7365,29 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, ret = get_errno(fallocate(arg1, arg2, arg3, arg4)); break; #endif +#if defined(CONFIG_SYNC_FILE_RANGE) +#if defined(TARGET_NR_sync_file_range) + case TARGET_NR_sync_file_range: +#if TARGET_ABI_BITS == 32 + ret = get_errno(sync_file_range(arg1, target_offset64(arg2, arg3), + target_offset64(arg4, arg5), arg6)); +#else + ret = get_errno(sync_file_range(arg1, arg2, arg3, arg4)); +#endif + break; +#endif +#if defined(TARGET_NR_sync_file_range2) + case TARGET_NR_sync_file_range2: + /* This is like sync_file_range but the arguments are reordered */ +#if TARGET_ABI_BITS == 32 + ret = get_errno(sync_file_range(arg1, target_offset64(arg3, arg4), + target_offset64(arg5, arg6), arg2)); +#else + ret = get_errno(sync_file_range(arg1, arg3, arg4, arg2)); +#endif + break; +#endif +#endif default: unimplemented: gemu_log("qemu: Unsupported syscall: %d\n", num); |