diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-03-29 15:21:00 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-05-03 15:17:56 +0400 |
commit | a7241974ceca3a783ab010f3fd1926fa42346a34 (patch) | |
tree | c34b1323dd4a96d92131dc9caf16c89c04ee5556 /util/oslib-posix.c | |
parent | ad24b679d215c2f8eaab6125a68e864c2a5d7dde (diff) |
Replace qemu_pipe() with g_unix_open_pipe()
GLib g_unix_open_pipe() is essentially like qemu_pipe(), available since
2.30.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'util/oslib-posix.c')
-rw-r--r-- | util/oslib-posix.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 289efca3fa..2a6f6248ad 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -274,28 +274,6 @@ void qemu_set_cloexec(int fd) assert(f != -1); } -/* - * Creates a pipe with FD_CLOEXEC set on both file descriptors - */ -int qemu_pipe(int pipefd[2]) -{ - int ret; - -#ifdef CONFIG_PIPE2 - ret = pipe2(pipefd, O_CLOEXEC); - if (ret != -1 || errno != ENOSYS) { - return ret; - } -#endif - ret = pipe(pipefd); - if (ret == 0) { - qemu_set_cloexec(pipefd[0]); - qemu_set_cloexec(pipefd[1]); - } - - return ret; -} - char * qemu_get_local_state_dir(void) { |