diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2013-04-13 13:50:34 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2013-04-13 13:50:34 +0200 |
commit | 396a14a3be17edbcdf33ad2c94d6e1069464f9e0 (patch) | |
tree | 5a094259c3450e656a061d61fc980f3b93881d25 /linux-user | |
parent | 0a9c2341de2e735166084538d000ed80182ff404 (diff) | |
parent | c30d1aea1478cd55e8cfdf866afa39cd00bb4ea1 (diff) | |
download | qemu-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.c | 11 |
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) |