Skip to contentSkip to conversation

char: move qemu_openpty_raw from util/ to char/

PATCH In review [email protected] 1 participant 1 message Mar 16, 2022 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 5/27 char: move qemu_openpty_raw from util/ to char/

From: Marc-André Lureau <[email protected]>

It is only needed by char-pty.

Fix the code style while at it.

---
 include/qemu-common.h |   2 -
 chardev/char-pty.c    | 111 +++++++++++++++++++++++++++++++++
 util/qemu-openpty.c   | 139 ------------------------------------------
 chardev/meson.build   |   4 +-
 util/meson.build      |   1 -
 5 files changed, 113 insertions(+), 144 deletions(-)
 delete mode 100644 util/qemu-openpty.c
include/qemu-common.h +0 -2
index 8c0d9ab0f771..c9f7dd7e193a 100644
@@ -31,8 +31,6 @@ ssize_t qemu_write_full(int fd, const void *buf, size_t count)
 
 #ifndef _WIN32
 int qemu_pipe(int pipefd[2]);
-/* like openpty() but also makes it raw; return master fd */
-int qemu_openpty_raw(int *aslave, char *pty_name);
 #endif
 
 #ifdef _WIN32
chardev/char-pty.c +111 -0

117 lines not on this page · raw message

util/qemu-openpty.c deleted +0 -139

139 lines not on this page · raw message

chardev/meson.build +2 -2
index 325ba2bdb97d..664f77b8879a 100644
@@ -12,11 +12,11 @@ chardev_ss.add(files(
   'char-udp.c',
   'char.c',
 ))
-chardev_ss.add(when: 'CONFIG_POSIX', if_true: files(
+chardev_ss.add(when: 'CONFIG_POSIX', if_true: [files(
   'char-fd.c',
   'char-parallel.c',
   'char-pty.c',
-))
+), util])
 chardev_ss.add(when: 'CONFIG_WIN32', if_true: files(
   'char-console.c',
   'char-win-stdio.c',
util/meson.build +0 -1
index bb0b010662d7..f8f0643318c3 100644
@@ -16,7 +16,6 @@ if targetos == 'freebsd'
   freebsd_dep = util
 endif
 util_ss.add(when: 'CONFIG_POSIX', if_true: [files('oslib-posix.c'), freebsd_dep])
-util_ss.add(when: 'CONFIG_POSIX', if_true: [files('qemu-openpty.c'), util])
 util_ss.add(when: 'CONFIG_POSIX', if_true: files('qemu-thread-posix.c'))
 util_ss.add(when: 'CONFIG_POSIX', if_true: files('memfd.c'))
 util_ss.add(when: 'CONFIG_WIN32', if_true: files('aio-win32.c'))
Signature · 1 line
2.35.1.273.ge6ebfd0e8cbb