summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Hecht <uli@suse.de>2009-09-17 20:22:14 +0300
committerRiku Voipio <riku.voipio@iki.fi>2009-10-15 23:55:55 +0300
commitd092793872848b83dfb8973640ce71dc2522a8f3 (patch)
treea32a3ec5321c36e688064a5fec58b3b1b36ec219 /linux-user
parentMIPS jazz: create isa bus (diff)
downloadqemu-kvm-d092793872848b83dfb8973640ce71dc2522a8f3.tar.gz
qemu-kvm-d092793872848b83dfb8973640ce71dc2522a8f3.tar.bz2
qemu-kvm-d092793872848b83dfb8973640ce71dc2522a8f3.zip
implementations of dup3 and fallocate that are good enough to fool LTP
updated fallocate check to new configure, added dup3 check as suggested by Jan-Simon Möller. Riku: updated to apply to current git. Signed-off-by: Ulrich Hecht <uli@suse.de> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index bf06d14fc..d07c381f0 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4746,6 +4746,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
case TARGET_NR_dup2:
ret = get_errno(dup2(arg1, arg2));
break;
+#if defined(CONFIG_DUP3) && defined(TARGET_NR_dup3)
+ case TARGET_NR_dup3:
+ ret = get_errno(dup3(arg1, arg2, arg3));
+ break;
+#endif
#ifdef TARGET_NR_getppid /* not on alpha */
case TARGET_NR_getppid:
ret = get_errno(getppid());
@@ -7013,6 +7018,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
break;
#endif
#endif /* CONFIG_EVENTFD */
+#if defined(CONFIG_FALLOCATE) && defined(TARGET_NR_fallocate)
+ case TARGET_NR_fallocate:
+ ret = get_errno(fallocate(arg1, arg2, arg3, arg4));
+ break;
+#endif
default:
unimplemented:
gemu_log("qemu: Unsupported syscall: %d\n", num);