summaryrefslogtreecommitdiff
path: root/chardev
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-01-26 17:19:46 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-06-02 11:33:52 +0400
commit8228e353d8906bf43399ca0ef28446c5c48bb686 (patch)
tree3dd8d23d8e5f0a690062e7f34b8fa5b169c79d55 /chardev
parentf664b88247487c4cb020d016bef0f3b1daf9f4e5 (diff)
downloadqemu-8228e353d8906bf43399ca0ef28446c5c48bb686.tar.gz
chardev: move headers to include/chardev
So they are all in one place. The following patch will move serial & parallel declarations to the respective headers. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'chardev')
-rw-r--r--chardev/char-console.c2
-rw-r--r--chardev/char-fd.c6
-rw-r--r--chardev/char-fd.h44
-rw-r--r--chardev/char-file.c6
-rw-r--r--chardev/char-io.c2
-rw-r--r--chardev/char-io.h46
-rw-r--r--chardev/char-mux.c4
-rw-r--r--chardev/char-mux.h63
-rw-r--r--chardev/char-null.c2
-rw-r--r--chardev/char-parallel.c6
-rw-r--r--chardev/char-parallel.h32
-rw-r--r--chardev/char-pipe.c6
-rw-r--r--chardev/char-pty.c4
-rw-r--r--chardev/char-ringbuf.c2
-rw-r--r--chardev/char-serial.c6
-rw-r--r--chardev/char-serial.h35
-rw-r--r--chardev/char-socket.c4
-rw-r--r--chardev/char-stdio.c8
-rw-r--r--chardev/char-udp.c4
-rw-r--r--chardev/char-win-stdio.c4
-rw-r--r--chardev/char-win-stdio.h29
-rw-r--r--chardev/char-win.c2
-rw-r--r--chardev/char-win.h51
-rw-r--r--chardev/char.c10
24 files changed, 39 insertions, 339 deletions
diff --git a/chardev/char-console.c b/chardev/char-console.c
index 8d972c1506..535ed65136 100644
--- a/chardev/char-console.c
+++ b/chardev/char-console.c
@@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
-#include "char-win.h"
+#include "chardev/char-win.h"
static void qemu_chr_open_win_con(Chardev *chr,
ChardevBackend *backend,
diff --git a/chardev/char-fd.c b/chardev/char-fd.c
index 0b182c552c..1584a3de20 100644
--- a/chardev/char-fd.c
+++ b/chardev/char-fd.c
@@ -25,11 +25,11 @@
#include "qemu/sockets.h"
#include "qapi/error.h"
#include "qemu-common.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
#include "io/channel-file.h"
-#include "char-fd.h"
-#include "char-io.h"
+#include "chardev/char-fd.h"
+#include "chardev/char-io.h"
/* Called with chr_write_lock held. */
static int fd_chr_write(Chardev *chr, const uint8_t *buf, int len)
diff --git a/chardev/char-fd.h b/chardev/char-fd.h
deleted file mode 100644
index d8327982fb..0000000000
--- a/chardev/char-fd.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * QEMU System Emulator
- *
- * Copyright (c) 2003-2008 Fabrice Bellard
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#ifndef CHAR_FD_H
-#define CHAR_FD_H
-
-#include "io/channel.h"
-#include "sysemu/char.h"
-
-typedef struct FDChardev {
- Chardev parent;
- Chardev *chr;
- QIOChannel *ioc_in, *ioc_out;
- int max_size;
-} FDChardev;
-
-#define TYPE_CHARDEV_FD "chardev-fd"
-
-#define FD_CHARDEV(obj) OBJECT_CHECK(FDChardev, (obj), TYPE_CHARDEV_FD)
-
-void qemu_chr_open_fd(Chardev *chr, int fd_in, int fd_out);
-int qmp_chardev_open_file_source(char *src, int flags, Error **errp);
-
-#endif /* CHAR_FD_H */
diff --git a/chardev/char-file.c b/chardev/char-file.c
index aed4ae1569..a57b88aaf2 100644
--- a/chardev/char-file.c
+++ b/chardev/char-file.c
@@ -24,12 +24,12 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
#ifdef _WIN32
-#include "char-win.h"
+#include "chardev/char-win.h"
#else
-#include "char-fd.h"
+#include "chardev/char-fd.h"
#endif
static void qmp_chardev_open_file(Chardev *chr,
diff --git a/chardev/char-io.c b/chardev/char-io.c
index b5708eef45..f81052481a 100644
--- a/chardev/char-io.c
+++ b/chardev/char-io.c
@@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
-#include "char-io.h"
+#include "chardev/char-io.h"
typedef struct IOWatchPoll {
GSource parent;
diff --git a/chardev/char-io.h b/chardev/char-io.h
deleted file mode 100644
index 55973a7671..0000000000
--- a/chardev/char-io.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * QEMU System Emulator
- *
- * Copyright (c) 2003-2008 Fabrice Bellard
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#ifndef CHAR_IO_H
-#define CHAR_IO_H
-
-#include "qemu-common.h"
-#include "io/channel.h"
-#include "sysemu/char.h"
-
-/* Can only be used for read */
-GSource *io_add_watch_poll(Chardev *chr,
- QIOChannel *ioc,
- IOCanReadHandler *fd_can_read,
- QIOChannelFunc fd_read,
- gpointer user_data,
- GMainContext *context);
-
-void remove_fd_in_watch(Chardev *chr);
-
-int io_channel_send(QIOChannel *ioc, const void *buf, size_t len);
-
-int io_channel_send_full(QIOChannel *ioc, const void *buf, size_t len,
- int *fds, size_t nfds);
-
-#endif /* CHAR_IO_H */
diff --git a/chardev/char-mux.c b/chardev/char-mux.c
index 37d42c65c6..106c682e7f 100644
--- a/chardev/char-mux.c
+++ b/chardev/char-mux.c
@@ -24,9 +24,9 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
#include "sysemu/block-backend.h"
-#include "char-mux.h"
+#include "chardev/char-mux.h"
/* MUX driver for serial I/O splitting */
diff --git a/chardev/char-mux.h b/chardev/char-mux.h
deleted file mode 100644
index 3f41dfcfd2..0000000000
--- a/chardev/char-mux.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * QEMU System Emulator
- *
- * Copyright (c) 2003-2008 Fabrice Bellard
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#ifndef CHAR_MUX_H
-#define CHAR_MUX_H
-
-#include "sysemu/char.h"
-
-extern bool muxes_realized;
-
-#define MAX_MUX 4
-#define MUX_BUFFER_SIZE 32 /* Must be a power of 2. */
-#define MUX_BUFFER_MASK (MUX_BUFFER_SIZE - 1)
-typedef struct MuxChardev {
- Chardev parent;
- CharBackend *backends[MAX_MUX];
- CharBackend chr;
- int focus;
- int mux_cnt;
- int term_got_escape;
- int max_size;
- /* Intermediate input buffer catches escape sequences even if the
- currently active device is not accepting any input - but only until it
- is full as well. */
- unsigned char buffer[MAX_MUX][MUX_BUFFER_SIZE];
- int prod[MAX_MUX];
- int cons[MAX_MUX];
- int timestamps;
-
- /* Protected by the Chardev chr_write_lock. */
- int linestart;
- int64_t timestamps_start;
-} MuxChardev;
-
-#define MUX_CHARDEV(obj) OBJECT_CHECK(MuxChardev, (obj), TYPE_CHARDEV_MUX)
-#define CHARDEV_IS_MUX(chr) \
- object_dynamic_cast(OBJECT(chr), TYPE_CHARDEV_MUX)
-
-void mux_chr_set_handlers(Chardev *chr, GMainContext *context);
-void mux_set_focus(Chardev *chr, int focus);
-void mux_chr_send_all_event(Chardev *chr, int event);
-
-#endif /* CHAR_MUX_H */
diff --git a/chardev/char-null.c b/chardev/char-null.c
index dc0d68ab2d..90bafe76f4 100644
--- a/chardev/char-null.c
+++ b/chardev/char-null.c
@@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
static void null_chr_open(Chardev *chr,
ChardevBackend *backend,
diff --git a/chardev/char-parallel.c b/chardev/char-parallel.c
index 3fa22ce29d..bce89f8c36 100644
--- a/chardev/char-parallel.c
+++ b/chardev/char-parallel.c
@@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
#include "qapi/error.h"
#include <sys/ioctl.h>
@@ -41,8 +41,8 @@
#endif
#endif
-#include "char-fd.h"
-#include "char-parallel.h"
+#include "chardev/char-fd.h"
+#include "chardev/char-parallel.h"
#if defined(__linux__)
diff --git a/chardev/char-parallel.h b/chardev/char-parallel.h
deleted file mode 100644
index 26742f9d5c..0000000000
--- a/chardev/char-parallel.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * QEMU System Emulator
- *
- * Copyright (c) 2003-2008 Fabrice Bellard
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#ifndef CHAR_PARALLEL_H
-#define CHAR_PARALLEL_H
-
-#if defined(__linux__) || defined(__FreeBSD__) || \
- defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-#define HAVE_CHARDEV_PARPORT 1
-#endif
-
-#endif /* CHAR_PARALLEL_H */
diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c
index aae950a22b..3a95e4c1b2 100644
--- a/chardev/char-pipe.c
+++ b/chardev/char-pipe.c
@@ -23,12 +23,12 @@
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
#ifdef _WIN32
-#include "char-win.h"
+#include "chardev/char-win.h"
#else
-#include "char-fd.h"
+#include "chardev/char-fd.h"
#endif
#ifdef _WIN32
diff --git a/chardev/char-pty.c b/chardev/char-pty.c
index 35a175d796..e5d20a0e6a 100644
--- a/chardev/char-pty.c
+++ b/chardev/char-pty.c
@@ -24,12 +24,12 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
#include "io/channel-file.h"
#include "qemu/sockets.h"
#include "qemu/error-report.h"
-#include "char-io.h"
+#include "chardev/char-io.h"
#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
|| defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \
diff --git a/chardev/char-ringbuf.c b/chardev/char-ringbuf.c
index d130069e88..df52b04d22 100644
--- a/chardev/char-ringbuf.c
+++ b/chardev/char-ringbuf.c
@@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
#include "qmp-commands.h"
#include "qemu/base64.h"
diff --git a/chardev/char-serial.c b/chardev/char-serial.c
index fef3a91c77..2f8f83821d 100644
--- a/chardev/char-serial.c
+++ b/chardev/char-serial.c
@@ -27,14 +27,14 @@
#include "qapi/error.h"
#ifdef _WIN32
-#include "char-win.h"
+#include "chardev/char-win.h"
#else
#include <sys/ioctl.h>
#include <termios.h>
-#include "char-fd.h"
+#include "chardev/char-fd.h"
#endif
-#include "char-serial.h"
+#include "chardev/char-serial.h"
#ifdef _WIN32
diff --git a/chardev/char-serial.h b/chardev/char-serial.h
deleted file mode 100644
index 64a27f63b1..0000000000
--- a/chardev/char-serial.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * QEMU System Emulator
- *
- * Copyright (c) 2003-2008 Fabrice Bellard
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#ifndef CHAR_SERIAL_H
-#define CHAR_SERIAL_H
-
-#ifdef _WIN32
-#define HAVE_CHARDEV_SERIAL 1
-#elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
- || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \
- || defined(__GLIBC__)
-#define HAVE_CHARDEV_SERIAL 1
-#endif
-
-#endif
diff --git a/chardev/char-socket.c b/chardev/char-socket.c
index e2fb7f7cd5..ccc499cfa1 100644
--- a/chardev/char-socket.c
+++ b/chardev/char-socket.c
@@ -22,14 +22,14 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
#include "io/channel-socket.h"
#include "io/channel-tls.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "qapi/clone-visitor.h"
-#include "char-io.h"
+#include "chardev/char-io.h"
/***********************************************************/
/* TCP Net console */
diff --git a/chardev/char-stdio.c b/chardev/char-stdio.c
index be4a65962c..6f5d798d7b 100644
--- a/chardev/char-stdio.c
+++ b/chardev/char-stdio.c
@@ -25,14 +25,14 @@
#include "qemu/sockets.h"
#include "qapi/error.h"
#include "qemu-common.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
#ifdef _WIN32
-#include "char-win.h"
-#include "char-win-stdio.h"
+#include "chardev/char-win.h"
+#include "chardev/char-win-stdio.h"
#else
#include <termios.h>
-#include "char-fd.h"
+#include "chardev/char-fd.h"
#endif
#ifndef _WIN32
diff --git a/chardev/char-udp.c b/chardev/char-udp.c
index 607647642a..4ee11d3ebf 100644
--- a/chardev/char-udp.c
+++ b/chardev/char-udp.c
@@ -22,11 +22,11 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
#include "io/channel-socket.h"
#include "qapi/error.h"
-#include "char-io.h"
+#include "chardev/char-io.h"
/***********************************************************/
/* UDP Net console */
diff --git a/chardev/char-win-stdio.c b/chardev/char-win-stdio.c
index eb44afc17a..efcf7827eb 100644
--- a/chardev/char-win-stdio.c
+++ b/chardev/char-win-stdio.c
@@ -23,8 +23,8 @@
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
-#include "char-win.h"
-#include "char-win-stdio.h"
+#include "chardev/char-win.h"
+#include "chardev/char-win-stdio.h"
typedef struct {
Chardev parent;
diff --git a/chardev/char-win-stdio.h b/chardev/char-win-stdio.h
deleted file mode 100644
index d7314f734d..0000000000
--- a/chardev/char-win-stdio.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * QEMU System Emulator
- *
- * Copyright (c) 2003-2008 Fabrice Bellard
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#ifndef CHAR_WIN_STDIO_H
-#define CHAR_WIN_STDIO_H
-
-#define TYPE_CHARDEV_WIN_STDIO "chardev-win-stdio"
-
-#endif /* CHAR_WIN_STDIO_H */
diff --git a/chardev/char-win.c b/chardev/char-win.c
index ec9a731be9..05518e0958 100644
--- a/chardev/char-win.c
+++ b/chardev/char-win.c
@@ -24,7 +24,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qapi/error.h"
-#include "char-win.h"
+#include "chardev/char-win.h"
static void win_chr_read(Chardev *chr, DWORD len)
{
diff --git a/chardev/char-win.h b/chardev/char-win.h
deleted file mode 100644
index 4994425e9e..0000000000
--- a/chardev/char-win.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * QEMU System Emulator
- *
- * Copyright (c) 2003-2008 Fabrice Bellard
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#ifndef CHAR_WIN_H
-#define CHAR_WIN_H
-
-#include "sysemu/char.h"
-
-typedef struct {
- Chardev parent;
-
- bool keep_open; /* console do not close file */
- HANDLE file, hrecv, hsend;
- OVERLAPPED orecv;
- BOOL fpipe;
-
- /* Protected by the Chardev chr_write_lock. */
- OVERLAPPED osend;
-} WinChardev;
-
-#define NSENDBUF 2048
-#define NRECVBUF 2048
-
-#define TYPE_CHARDEV_WIN "chardev-win"
-#define WIN_CHARDEV(obj) OBJECT_CHECK(WinChardev, (obj), TYPE_CHARDEV_WIN)
-
-void win_chr_set_file(Chardev *chr, HANDLE file, bool keep_open);
-int win_chr_serial_init(Chardev *chr, const char *filename, Error **errp);
-int win_chr_pipe_poll(void *opaque);
-
-#endif /* CHAR_WIN_H */
diff --git a/chardev/char.c b/chardev/char.c
index 26607c1c6b..02142b480e 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -28,16 +28,16 @@
#include "sysemu/sysemu.h"
#include "qemu/config-file.h"
#include "qemu/error-report.h"
-#include "sysemu/char.h"
+#include "chardev/char.h"
#include "qmp-commands.h"
#include "qapi-visit.h"
#include "sysemu/replay.h"
#include "qemu/help_option.h"
-#include "char-mux.h"
-#include "char-io.h"
-#include "char-parallel.h"
-#include "char-serial.h"
+#include "chardev/char-mux.h"
+#include "chardev/char-io.h"
+#include "chardev/char-parallel.h"
+#include "chardev/char-serial.h"
/***********************************************************/
/* character device */