qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: riku.voipio@iki.fi
Subject: [Qemu-devel] [PATCH 05/10] linux-user: Handle O_SYNC, O_NOATIME, O_CLOEXEC, O_PATH
Date: Wed, 25 Jul 2012 15:10:33 -0700	[thread overview]
Message-ID: <1343254238-4727-6-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1343254238-4727-1-git-send-email-rth@twiddle.net>

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 linux-user/strace.c  |   12 +++++++++++-
 linux-user/syscall.c |   15 ++++++++++++++-
 2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/linux-user/strace.c b/linux-user/strace.c
index 05a0d3e..6ec90e8 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -371,11 +371,21 @@ UNUSED static struct flags open_flags[] = {
     FLAG_TARGET(O_NOCTTY),
     FLAG_TARGET(O_NOFOLLOW),
     FLAG_TARGET(O_NONBLOCK),      /* also O_NDELAY */
-    FLAG_TARGET(O_SYNC),
+    FLAG_TARGET(O_DSYNC),
+    FLAG_TARGET(__O_SYNC),
     FLAG_TARGET(O_TRUNC),
 #ifdef O_DIRECT
     FLAG_TARGET(O_DIRECT),
 #endif
+#ifdef O_NOATIME
+    FLAG_TARGET(O_NOATIME),
+#endif
+#ifdef O_CLOEXEC
+    FLAG_TARGET(O_CLOEXEC),
+#endif
+#ifdef O_PATH
+    FLAG_TARGET(O_PATH),
+#endif
     FLAG_END,
 };
 
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 1cbbfbf..8a454cc 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -261,14 +261,27 @@ static bitmask_transtbl fcntl_flags_tbl[] = {
   { TARGET_O_TRUNC,     TARGET_O_TRUNC,     O_TRUNC,     O_TRUNC,     },
   { TARGET_O_APPEND,    TARGET_O_APPEND,    O_APPEND,    O_APPEND,    },
   { TARGET_O_NONBLOCK,  TARGET_O_NONBLOCK,  O_NONBLOCK,  O_NONBLOCK,  },
+  { TARGET_O_SYNC,      TARGET_O_DSYNC,     O_SYNC,      O_DSYNC,     },
   { TARGET_O_SYNC,      TARGET_O_SYNC,      O_SYNC,      O_SYNC,      },
   { TARGET_FASYNC,      TARGET_FASYNC,      FASYNC,      FASYNC,      },
   { TARGET_O_DIRECTORY, TARGET_O_DIRECTORY, O_DIRECTORY, O_DIRECTORY, },
   { TARGET_O_NOFOLLOW,  TARGET_O_NOFOLLOW,  O_NOFOLLOW,  O_NOFOLLOW,  },
-  { TARGET_O_LARGEFILE, TARGET_O_LARGEFILE, O_LARGEFILE, O_LARGEFILE, },
 #if defined(O_DIRECT)
   { TARGET_O_DIRECT,    TARGET_O_DIRECT,    O_DIRECT,    O_DIRECT,    },
 #endif
+#if defined(O_NOATIME)
+  { TARGET_O_NOATIME,   TARGET_O_NOATIME,   O_NOATIME,   O_NOATIME    },
+#endif
+#if defined(O_CLOEXEC)
+  { TARGET_O_CLOEXEC,   TARGET_O_CLOEXEC,   O_CLOEXEC,   O_CLOEXEC    },
+#endif
+#if defined(O_PATH)
+  { TARGET_O_PATH,      TARGET_O_PATH,      O_PATH,      O_PATH       },
+#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, },
+#endif
   { 0, 0, 0, 0 }
 };
 
-- 
1.7.7.6

  parent reply	other threads:[~2012-07-25 22:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-25 22:10 [Qemu-devel] [PATCH v4 00/10] {alpha-}linux user improvements Richard Henderson
2012-07-25 22:10 ` [Qemu-devel] [PATCH 01/10] alpha-linux-user: Fix signal handling Richard Henderson
2012-08-02 14:07   ` Peter Maydell
2012-07-25 22:10 ` [Qemu-devel] [PATCH 02/10] alpha-linux-user: Work around hosted mmap allocation problems Richard Henderson
2012-07-25 22:10 ` [Qemu-devel] [PATCH 03/10] alpha-linux-user: Handle TARGET_SSI_IEEE_RAISE_EXCEPTION properly Richard Henderson
2012-08-02 14:11   ` Peter Maydell
2012-07-25 22:10 ` [Qemu-devel] [PATCH 04/10] linux-user: Sync fcntl.h bits with the kernel Richard Henderson
2012-08-02 14:34   ` Peter Maydell
2012-08-02 15:17     ` Richard Henderson
2012-07-25 22:10 ` Richard Henderson [this message]
2012-08-02 14:38   ` [Qemu-devel] [PATCH 05/10] linux-user: Handle O_SYNC, O_NOATIME, O_CLOEXEC, O_PATH Peter Maydell
2012-07-25 22:10 ` [Qemu-devel] [PATCH 06/10] linux-user: Allocate the right amount of space for non-fixed file maps Richard Henderson
2012-07-25 22:10 ` [Qemu-devel] [PATCH 07/10] linux-user: Translate pipe2 flags; add to strace Richard Henderson
2012-08-02 14:40   ` Peter Maydell
2012-07-25 22:10 ` [Qemu-devel] [PATCH 08/10] alpha-linux-user: Fix a3 error return with v0 error bypass Richard Henderson
2012-07-25 22:10 ` [Qemu-devel] [PATCH 09/10] alpha-linux-user: Properly handle the non-rt sigprocmask syscall Richard Henderson
2012-08-02 14:41   ` Peter Maydell
2012-07-25 22:10 ` [Qemu-devel] [PATCH 10/10] alpha-linux-user: Fix the getpriority syscall Richard Henderson
2012-08-02 14:48   ` Peter Maydell
2012-08-02 15:23     ` Richard Henderson
2012-08-01 23:24 ` [Qemu-devel] [PATCH v4 00/10] {alpha-}linux user improvements Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2012-08-03 22:40 [Qemu-devel] [PATCH v5 " Richard Henderson
2012-08-03 22:40 ` [Qemu-devel] [PATCH 05/10] linux-user: Handle O_SYNC, O_NOATIME, O_CLOEXEC, O_PATH Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343254238-4727-6-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).