summaryrefslogtreecommitdiffstats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorRiku Voipio2017-08-08 15:01:19 +0200
committerRiku Voipio2017-10-16 15:00:56 +0200
commit5f9cee46cd4ec4600e1a2fdcca20adcf30348f9e (patch)
treecd3b518fdc93ec4090b02dd465a7287ec620a873 /linux-user/syscall.c
parentMerge remote-tracking branch 'remotes/elmarco/tags/vu-pull-request' into staging (diff)
downloadqemu-5f9cee46cd4ec4600e1a2fdcca20adcf30348f9e.tar.gz
qemu-5f9cee46cd4ec4600e1a2fdcca20adcf30348f9e.tar.xz
qemu-5f9cee46cd4ec4600e1a2fdcca20adcf30348f9e.zip
linux-user: fix O_TMPFILE handling
Since O_TMPFILE might differ between guest and host, add it to the bitmask_transtbl. While at it, fix the definitions of O_DIRECTORY etc which should arm32 according to kernel sources. This fixes open14 and openat03 ltp testcases. Fixes: https://bugs.launchpad.net/qemu/+bug/1709170
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 9b6364a266..08fbc4d5f7 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -342,6 +342,9 @@ static bitmask_transtbl fcntl_flags_tbl[] = {
#if defined(O_PATH)
{ TARGET_O_PATH, TARGET_O_PATH, O_PATH, O_PATH },
#endif
+#if defined(O_TMPFILE)
+ { TARGET_O_TMPFILE, TARGET_O_TMPFILE, O_TMPFILE, O_TMPFILE },
+#endif
/* Don't terminate the list prematurely on 64-bit host+guest. */
#if TARGET_O_LARGEFILE != 0 || O_LARGEFILE != 0
{ TARGET_O_LARGEFILE, TARGET_O_LARGEFILE, O_LARGEFILE, O_LARGEFILE, },