diff options
author | Helge Deller <deller@gmx.de> | 2022-07-19 18:20:42 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2022-07-25 10:42:11 +0200 |
commit | 499d8055379f5beb2ca155c668eca52b8a24321a (patch) | |
tree | 24bffb2800645af01ecfb0b80ed6922fb55accd4 /linux-user/syscall.c | |
parent | bd4b7fd6ba98e2d660356f1f52edcec5c51b0991 (diff) |
linux-user: Unconditionally use pipe2() syscall
The pipe2() syscall is available on all Linux platforms since kernel
2.6.27, so use it unconditionally to emulate pipe() and pipe2().
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <YtbZ2ojisTnzxN9Y@p100>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 991b85e6b4..4f89184d05 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1586,21 +1586,12 @@ static abi_long do_ppoll(abi_long arg1, abi_long arg2, abi_long arg3, } #endif -static abi_long do_pipe2(int host_pipe[], int flags) -{ -#ifdef CONFIG_PIPE2 - return pipe2(host_pipe, flags); -#else - return -ENOSYS; -#endif -} - static abi_long do_pipe(CPUArchState *cpu_env, abi_ulong pipedes, int flags, int is_pipe2) { int host_pipe[2]; abi_long ret; - ret = flags ? do_pipe2(host_pipe, flags) : pipe(host_pipe); + ret = pipe2(host_pipe, flags); if (is_error(ret)) return get_errno(ret); |