Patchwork [6/6] linux-user: Translate pipe2 flags; add to strace

login
register
mail settings
Submitter Richard Henderson
Date June 2, 2012, 7:29 p.m.
Message ID <1338665397-20917-7-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/162449/
State New
Headers show

Comments

Richard Henderson - June 2, 2012, 7:29 p.m.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 linux-user/strace.list |    3 +++
 linux-user/syscall.c   |    3 ++-
 2 files changed, 5 insertions(+), 1 deletions(-)

Patch

diff --git a/linux-user/strace.list b/linux-user/strace.list
index a7eeaef..af3c6a0 100644
--- a/linux-user/strace.list
+++ b/linux-user/strace.list
@@ -1527,3 +1527,6 @@ 
 #ifdef TARGET_NR_sync_file_range2
 { TARGET_NR_sync_file_range2, "sync_file_range2", NULL, NULL, NULL },
 #endif
+#ifdef TARGET_NR_pipe2
+{ TARGET_NR_pipe2, "pipe2", NULL, NULL, NULL },
+#endif
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 40b2e3b..705bf47 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5592,7 +5592,8 @@  abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         break;
 #ifdef TARGET_NR_pipe2
     case TARGET_NR_pipe2:
-        ret = do_pipe(cpu_env, arg1, arg2, 1);
+        ret = do_pipe(cpu_env, arg1,
+                      target_to_host_bitmask(arg2, fcntl_flags_tbl), 1);
         break;
 #endif
     case TARGET_NR_times: