aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2013-04-13 13:50:34 +0200
committerAurelien Jarno <aurelien@aurel32.net>2013-04-13 13:50:34 +0200
commit396a14a3be17edbcdf33ad2c94d6e1069464f9e0 (patch)
tree5a094259c3450e656a061d61fc980f3b93881d25 /linux-user
parent0a9c2341de2e735166084538d000ed80182ff404 (diff)
parentc30d1aea1478cd55e8cfdf866afa39cd00bb4ea1 (diff)
downloadqemu-396a14a3be17edbcdf33ad2c94d6e1069464f9e0.zip
qemu-396a14a3be17edbcdf33ad2c94d6e1069464f9e0.tar.gz
qemu-396a14a3be17edbcdf33ad2c94d6e1069464f9e0.tar.bz2
Merge branch 'trivial-patches' of git://github.com/stefanha/qemu
* 'trivial-patches' of git://github.com/stefanha/qemu: cpu-exec: Allow "-d exec" in non-debug builds (drop CONFIG_DEBUG_EXEC) Typo, spelling and grammatical fixes linux-user: pass correct host flags to eventfd2 call target-moxie: Fix VMState registration
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index ee82a2d..1f07621 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8823,8 +8823,17 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
#endif
#if defined(TARGET_NR_eventfd2)
case TARGET_NR_eventfd2:
- ret = get_errno(eventfd(arg1, arg2));
+ {
+ int host_flags = arg2 & (~(TARGET_O_NONBLOCK | TARGET_O_CLOEXEC));
+ if (arg2 & TARGET_O_NONBLOCK) {
+ host_flags |= O_NONBLOCK;
+ }
+ if (arg2 & TARGET_O_CLOEXEC) {
+ host_flags |= O_CLOEXEC;
+ }
+ ret = get_errno(eventfd(arg1, host_flags));
break;
+ }
#endif
#endif /* CONFIG_EVENTFD */
#if defined(CONFIG_FALLOCATE) && defined(TARGET_NR_fallocate)