]> git.proxmox.com Git - qemu.git/commitdiff
softmmu: move remaining include files to include/ subdirectories
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 17 Dec 2012 17:20:05 +0000 (18:20 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Dec 2012 07:32:46 +0000 (08:32 +0100)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
63 files changed:
backends/rng-egd.c
bt-host.c
bt-host.h [deleted file]
bt-vhci.c
event_notifier-posix.c
gdbstub.c
hmp.c
hw/baum.c
hw/bt-hci-csr.c
hw/bt-hci.c
hw/bt.c
hw/cadence_uart.c
hw/ccid-card-emulated.c
hw/ccid-card-passthru.c
hw/debugcon.c
hw/escc.c
hw/etraxfs_ser.c
hw/exynos4210_uart.c
hw/grlib_apbuart.c
hw/imx_serial.c
hw/ivshmem.c
hw/leon3.c
hw/lm32_juart.c
hw/lm32_uart.c
hw/mcf_uart.c
hw/milkymist-uart.c
hw/mips_fulong2e.c
hw/mips_malta.c
hw/msmouse.c
hw/omap2.c
hw/omap_uart.c
hw/parallel.c
hw/pl011.c
hw/pxa2xx.c
hw/qdev-properties.c
hw/s390x/sclpconsole.c
hw/serial.c
hw/sh_serial.c
hw/spapr_events.c
hw/spapr_rtas.c
hw/spapr_vty.c
hw/strongarm.c
hw/usb/dev-bluetooth.c
hw/usb/dev-serial.c
hw/virtio-console.c
hw/xen_backend.c
hw/xen_console.c
hw/xenfb.c
hw/xgmac.c
hw/xilinx_uartlite.c
hw/xtensa_lx60.c
include/bt/bt.h [new file with mode: 0644]
include/char/char.h [new file with mode: 0644]
monitor.c
net/slirp.c
qemu-char.c
qemu-char.h [deleted file]
qmp.c
qtest.c
slirp/slirp.c
spice-qemu-char.c
ui/console.c
vl.c

index 3a7d1ecbe02e8241398e5fb0b134f4918f10467d..fd41b531882987e64ee16d1b2ac017ab8f15efee 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/rng.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qapi/qmp/qerror.h"
 #include "hw/qdev.h" /* just for DEFINE_PROP_CHR */
 
index 4f5f9f93c58dee2a9c8f4917ad8c963ffae5be27..2092754530a0dd3e7fe47be3e0a863b8e6067ce4 100644 (file)
--- a/bt-host.c
+++ b/bt-host.c
@@ -18,7 +18,7 @@
  */
 
 #include "qemu-common.h"
-#include "bt-host.h"
+#include "bt/bt.h"
 #include "qemu/main-loop.h"
 
 #ifndef _WIN32
diff --git a/bt-host.h b/bt-host.h
deleted file mode 100644 (file)
index 2bc6d53..0000000
--- a/bt-host.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef BT_HOST_H
-#define BT_HOST_H
-
-/* BT HCI info */
-
-struct HCIInfo {
-    int (*bdaddr_set)(struct HCIInfo *hci, const uint8_t *bd_addr);
-    void (*cmd_send)(struct HCIInfo *hci, const uint8_t *data, int len);
-    void (*sco_send)(struct HCIInfo *hci, const uint8_t *data, int len);
-    void (*acl_send)(struct HCIInfo *hci, const uint8_t *data, int len);
-    void *opaque;
-    void (*evt_recv)(void *opaque, const uint8_t *data, int len);
-    void (*acl_recv)(void *opaque, const uint8_t *data, int len);
-};
-
-/* bt-host.c */
-struct HCIInfo *bt_host_hci(const char *id);
-struct HCIInfo *qemu_next_hci(void);
-
-#endif
index f5d856a80940ba60a1ed01c2974397f18cc655b0..a6a7ab032955a9c926f3a3ca6153847dcf81042f 100644 (file)
--- a/bt-vhci.c
+++ b/bt-vhci.c
@@ -18,7 +18,7 @@
  */
 
 #include "qemu-common.h"
-#include "bt-host.h"
+#include "bt/bt.h"
 #include "hw/bt.h"
 #include "qemu/main-loop.h"
 
index a53b95688d7e2bf42d3ecbeb0879364756fd4fab..713d7560d0abd8f349b6a86ebc5def1bd6f49cdf 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "qemu-common.h"
 #include "qemu/event_notifier.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/main-loop.h"
 
 #ifdef CONFIG_EVENTFD
index 2fca1a7ebf476ee0cc63dd71ed03a1a15c2475a9..a8dd437ec0a6d671c6bc3a2bbf84e7de3e2d0f23 100644 (file)
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -30,7 +30,7 @@
 #include "qemu.h"
 #else
 #include "monitor/monitor.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "sysemu/sysemu.h"
 #include "exec/gdbstub.h"
 #endif
diff --git a/hmp.c b/hmp.c
index 3d056b0e387e650c81c191ad57411e34bf8a3ba0..9e9e62450e14eac31a19e0d1a5085f720159b09c 100644 (file)
--- a/hmp.c
+++ b/hmp.c
@@ -15,7 +15,7 @@
 
 #include "hmp.h"
 #include "net/net.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/option.h"
 #include "qemu/timer.h"
 #include "qmp-commands.h"
index 97d13ea3441bc3258e459e809b516382f838ee7f..09dcb9cc7413725cc70971d4d7467847318248e8 100644 (file)
--- a/hw/baum.c
+++ b/hw/baum.c
@@ -22,7 +22,7 @@
  * THE SOFTWARE.
  */
 #include "qemu-common.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/timer.h"
 #include "usb.h"
 #include "baum.h"
index e1dcb6d099c610eaaac79e9cc8619ad9ba9eca80..2070bb940c7a1316afde7a6d1ca620cb33def32e 100644 (file)
  */
 
 #include "qemu-common.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/timer.h"
 #include "irq.h"
-#include "bt-host.h"
+#include "bt/bt.h"
 #include "bt.h"
 
 struct csrhci_s {
index da096d8c37f5258ee01ebc5e8de9e567f3afa558..69d2c73862c3c6a1492d7f86274f7255d7fa3e14 100644 (file)
@@ -21,7 +21,7 @@
 #include "qemu-common.h"
 #include "qemu/timer.h"
 #include "usb.h"
-#include "bt-host.h"
+#include "bt/bt.h"
 #include "bt.h"
 
 struct bt_hci_s {
diff --git a/hw/bt.c b/hw/bt.c
index 3fea0983d40b0e0b2af98f3f4d1dd7f2a17d448b..4f2372d7943b7046473546ad351da2917e8105b5 100644 (file)
--- a/hw/bt.c
+++ b/hw/bt.c
@@ -18,7 +18,7 @@
  */
 
 #include "qemu-common.h"
-#include "bt-host.h"
+#include "bt/bt.h"
 #include "bt.h"
 
 /* Slave implementations can ignore this */
index f34acc8c46e589443d130c05204e8b5a8defa92c..7dd2fe54edfa97c569b2fa1923e5165b39af2931 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/timer.h"
 
 #ifdef CADENCE_UART_ERR_DEBUG
index e5083804825fa36c7b669934be51411518dda142..6fd44695ae5e43c9810b0cab516660097d711e77 100644 (file)
@@ -32,7 +32,7 @@
 #include <vcard_emul.h>
 
 #include "qemu/thread.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "monitor/monitor.h"
 #include "hw/ccid.h"
 
index 48e4228b9dc141890eb6bd3bf4055b15a4a859c6..4be05471a9956ba8b0be0d3a3dc4959b2b59c085 100644 (file)
@@ -8,7 +8,7 @@
  * See the COPYING file in the top-level directory.
  */
 
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/sockets.h"
 #include "monitor/monitor.h"
 #include "hw/ccid.h"
index 14ab326be360a7a35f84497bc829f0adeb86ea20..14f83f196218bed5cabb485a40a370c6b10cb720 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include "hw.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "isa.h"
 #include "pc.h"
 
index 38e8164e44cd3188efcc064c616b7d993cc2b234..f09904aae4cf6a61a07e53dfd6bffc03f6cdab7a 100644 (file)
--- a/hw/escc.c
+++ b/hw/escc.c
@@ -25,7 +25,7 @@
 #include "hw.h"
 #include "sysbus.h"
 #include "escc.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "ui/console.h"
 #include "trace.h"
 
index 59cb7d217285540181a91932c52ac4dc0f21b025..7bde8004d0095c395ba04aa9129e2022361c2953 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/log.h"
 
 #define D(x)
index 8950891a00eb813ea05834d471758936ec9b5b9d..4f23079095d03bfa772afe36ea4a83239c1bf5b7 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "sysbus.h"
 #include "sysemu/sysemu.h"
-#include "qemu-char.h"
+#include "char/char.h"
 
 #include "exynos4210.h"
 
index 0865764deb37558030242b6604d0a43a1370b77a..88c46780d1bbfed13a12bfa180bda678fbe2ed99 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-char.h"
+#include "char/char.h"
 
 #include "trace.h"
 
index e56e3ea7262d3d3448e4d1b5ff16b80715fd9fe4..124dbb28603dd356282e99e7451efd7ab7a89870 100644 (file)
@@ -20,7 +20,7 @@
 #include "hw.h"
 #include "sysbus.h"
 #include "sysemu/sysemu.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "imx.h"
 
 //#define DEBUG_SERIAL 1
index 567c9a76a7af7f0639f4e6abcb6f7a9b93ee6507..fcf5d05bae7b375dca7c82f596be1c450af6b03a 100644 (file)
@@ -24,7 +24,7 @@
 #include "migration/migration.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/event_notifier.h"
-#include "qemu-char.h"
+#include "char/char.h"
 
 #include <sys/mman.h>
 #include <sys/types.h>
index d1d4541867c71eeed050aff69cedcdb055e4a40f..79b3a41def144c933606b94d965e0237d08ca923 100644 (file)
@@ -24,7 +24,7 @@
 #include "hw.h"
 #include "qemu/timer.h"
 #include "ptimer.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "sysemu/sysemu.h"
 #include "boards.h"
 #include "loader.h"
index f07ed3977f5b8d67f2105e17493df7e1e4a1fd8d..7c2d202d6abecaadc2c5288dba1480de47d7b93c 100644 (file)
@@ -20,7 +20,7 @@
 #include "hw.h"
 #include "sysbus.h"
 #include "trace.h"
-#include "qemu-char.h"
+#include "char/char.h"
 
 #include "lm32_juart.h"
 
index bf2f507523da5afe2d18e8c8fcadb2a381e4d426..89605b8e7751cc9649009c919fd271356008d727 100644 (file)
@@ -25,7 +25,7 @@
 #include "hw.h"
 #include "sysbus.h"
 #include "trace.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/error-report.h"
 
 enum {
index 2eca2c6ae93d1f61fb3bf9903a06b616c9432f26..c44344317a960035611e2938e8a19fe73f26cb1b 100644 (file)
@@ -7,7 +7,7 @@
  */
 #include "hw.h"
 #include "mcf.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "exec/address-spaces.h"
 
 typedef struct {
index ef5518e5c26b75d3b786e1dc5be7eddcf89322e3..19e9dbdc751fa5fc0ac0d88042944fb6783955de 100644 (file)
@@ -24,7 +24,7 @@
 #include "hw.h"
 #include "sysbus.h"
 #include "trace.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/error-report.h"
 
 enum {
index e7eeda319e4b2bcf43d40b178970e92bff67efec..4d8ee8c09ca7da92369e5239cbc034187083268e 100644 (file)
@@ -30,7 +30,7 @@
 #include "mips.h"
 #include "mips_cpudevs.h"
 #include "pci/pci.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "sysemu/sysemu.h"
 #include "audio/audio.h"
 #include "qemu/log.h"
index bd31ced29dc366a27e1b21f759c07317b399e766..635143d20c94ed71a8b8f87e769f0738e7a4336a 100644 (file)
@@ -34,7 +34,7 @@
 #include "mips.h"
 #include "mips_cpudevs.h"
 #include "pci/pci.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/arch_init.h"
 #include "boards.h"
index decb1a3b5db7336fc3d6205dfeaa4805dc42149e..ef47aed4e92c595a177f8d372e4face9c34e5a37 100644 (file)
@@ -23,7 +23,7 @@
  */
 #include <stdlib.h>
 #include "qemu-common.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "ui/console.h"
 #include "msmouse.h"
 
index dc6867c962fc45c068e3af836cc7b1615885cc58..c8358500bc332c8fbeeea1f3510bf20b94bebfba 100644 (file)
@@ -24,7 +24,7 @@
 #include "omap.h"
 #include "sysemu/sysemu.h"
 #include "qemu/timer.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "flash.h"
 #include "soc_dma.h"
 #include "sysbus.h"
index 159b2d1cddd8c352274ee3dd9ff24abc425a58a6..0ebfbf8caec5c7cf8aa4ce85dc2be7f1ded3d49a 100644 (file)
@@ -17,7 +17,7 @@
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
-#include "qemu-char.h"
+#include "char/char.h"
 #include "hw.h"
 #include "omap.h"
 #include "serial.h"
index 56b3760e8ca85b8ce657aea139a12a7364e3547e..64a46c6055b9357e0e00e444222158044bf3a0ad 100644 (file)
@@ -23,7 +23,7 @@
  * THE SOFTWARE.
  */
 #include "hw.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "isa.h"
 #include "pc.h"
 #include "sysemu/sysemu.h"
index 1f7ce2f94cb28dc965a12bc4acb4894630d54440..35835f36c01e70de77cdf313cb63cf35a4ff0ef6 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-char.h"
+#include "char/char.h"
 
 typedef struct {
     SysBusDevice busdev;
index 936e9f87cd70917f236287114a901613e4bc21b5..3c51bc82aaf6c91c372cbc01af1ed5034ab937b6 100644 (file)
@@ -13,7 +13,7 @@
 #include "serial.h"
 #include "i2c.h"
 #include "ssi.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "sysemu/blockdev.h"
 
 static struct {
index 1cb97ea594988025d43d22d7790391b1dd0c56d6..04d605dd37cb336b16a46a781edab682e28aaef7 100644 (file)
@@ -5,7 +5,7 @@
 #include "hw/block-common.h"
 #include "net/hub.h"
 #include "qapi/visitor.h"
-#include "qemu-char.h"
+#include "char/char.h"
 
 void *qdev_get_prop_ptr(DeviceState *dev, Property *prop)
 {
index ca78d6796ab9c8d98bd1c10da9f97e6b9b9159fc..aa70e16665e9f55872d43b9fc4416327038afaa1 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "sclp.h"
 #include "event-facility.h"
-#include "qemu-char.h"
+#include "char/char.h"
 
 typedef struct ASCIIConsoleData {
     EventBufferHeader ebh;
index 2cbb5447a76ab850e26b16e0331550cb87292976..a5b2a0c6093ac25ea404044744822082a365fb8f 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "serial.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/timer.h"
 #include "exec/address-spaces.h"
 
index 63723496f18d00096b50f61c7c35353c71113ff8..21c5b1362d1da305f02166821e8438111ed7d953 100644 (file)
@@ -26,7 +26,7 @@
  */
 #include "hw.h"
 #include "sh.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "exec/address-spaces.h"
 
 //#define DEBUG_SERIAL
index 7956601466ef3a6f34751855b10fc3952c01a8a9..ce78f0922e7f47e7ab5cca323e5c72ca732678f8 100644 (file)
@@ -26,7 +26,7 @@
  */
 #include "cpu.h"
 #include "sysemu/sysemu.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "hw/qdev.h"
 #include "sysemu/device_tree.h"
 
index d29736285ce5c4c77e4beb52fc53579fa4939da1..81eecd0940a526f14a463c8ac753fa43ccad643b 100644 (file)
@@ -26,7 +26,7 @@
  */
 #include "cpu.h"
 #include "sysemu/sysemu.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "hw/qdev.h"
 #include "sysemu/device_tree.h"
 
index 14f862fba142327fbfbb3c8a0e6b5da6b2ec84b1..ec81a7e6e8638d44e7742679d1482f612bbb55d0 100644 (file)
@@ -1,5 +1,5 @@
 #include "qdev.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "hw/spapr.h"
 #include "hw/spapr_vio.h"
 
index 5d5f454b1d89fc5f20a36f6f04d3dae9d0fd6c38..804c1a37a6520ceac1bc7a9f0237ec0987786c31 100644 (file)
@@ -30,7 +30,7 @@
 #include "strongarm.h"
 #include "qemu/error-report.h"
 #include "arm-misc.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "sysemu/sysemu.h"
 #include "ssi.h"
 
index 4a37442288ace2b98bb80ebacfd20adef330b8cf..a0d7a88d9179e95b6e5980afc40372ea9398cad4 100644 (file)
@@ -21,7 +21,7 @@
 #include "qemu-common.h"
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
-#include "bt-host.h"
+#include "bt/bt.h"
 #include "hw/bt.h"
 
 struct USBBtState {
index 2ff4fe247a669b07e1e8244f348374309dce92bf..20cf5337b7d3aedc928709e9b2ed8561265c7cf0 100644 (file)
@@ -12,7 +12,7 @@
 #include "qemu/error-report.h"
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
-#include "qemu-char.h"
+#include "char/char.h"
 
 //#define DEBUG_Serial
 
index df0951e97368bcc3ab79831c0cade60799b0ace1..002b028b997ee2ac63efcefe45560b8b7061d45f 100644 (file)
@@ -10,7 +10,7 @@
  * the COPYING file in the top-level directory.
  */
 
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/error-report.h"
 #include "trace.h"
 #include "virtio-serial.h"
index 270584fc102f5ce04492f622afac007cca7b9aeb..3fa30098ca55379691a23f74170c795543f785da 100644 (file)
@@ -35,7 +35,7 @@
 #include <sys/signal.h>
 
 #include "hw.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/log.h"
 #include "xen_backend.h"
 
index 9426d7374f5864ae3ae8f02847d0508fb758bc8c..ac36ceb47ce2120424ce859c3308adb890f29f40 100644 (file)
@@ -30,7 +30,7 @@
 #include <sys/mman.h>
 
 #include "hw.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "xen_backend.h"
 
 #include <xen/io/console.h>
index b1122bd933f429218115eb17898f2823aaca2e15..903efd30736d905be7b42ebc9ff804f302a1f6eb 100644 (file)
@@ -37,7 +37,7 @@
 
 #include "hw.h"
 #include "ui/console.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "xen_backend.h"
 
 #include <xen/event_channel.h>
index acc3d376489bcb33a28edf392f7f692895871bbd..9639b6141b4992db224f5cbd0d673ec233bf46fb 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/log.h"
 #include "net/net.h"
 #include "net/checksum.h"
index 02c5850331b8f463aa7b91823e7a447f466c863f..abd256ae008929e75de60eac97d5e2995571b3c0 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "sysbus.h"
-#include "qemu-char.h"
+#include "char/char.h"
 
 #define DUART(x)
 
index 9c7bb75f8183aff5bc2b749f7e77a826d19798a2..0b9a52851a86b5d5c3e01e70ff04f36f3f698292 100644 (file)
@@ -36,7 +36,7 @@
 #include "sysbus.h"
 #include "flash.h"
 #include "sysemu/blockdev.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "xtensa_bootparam.h"
 
 typedef struct LxBoardDesc {
diff --git a/include/bt/bt.h b/include/bt/bt.h
new file mode 100644 (file)
index 0000000..2bc6d53
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef BT_HOST_H
+#define BT_HOST_H
+
+/* BT HCI info */
+
+struct HCIInfo {
+    int (*bdaddr_set)(struct HCIInfo *hci, const uint8_t *bd_addr);
+    void (*cmd_send)(struct HCIInfo *hci, const uint8_t *data, int len);
+    void (*sco_send)(struct HCIInfo *hci, const uint8_t *data, int len);
+    void (*acl_send)(struct HCIInfo *hci, const uint8_t *data, int len);
+    void *opaque;
+    void (*evt_recv)(void *opaque, const uint8_t *data, int len);
+    void (*acl_recv)(void *opaque, const uint8_t *data, int len);
+};
+
+/* bt-host.c */
+struct HCIInfo *bt_host_hci(const char *id);
+struct HCIInfo *qemu_next_hci(void);
+
+#endif
diff --git a/include/char/char.h b/include/char/char.h
new file mode 100644 (file)
index 0000000..baa5d03
--- /dev/null
@@ -0,0 +1,254 @@
+#ifndef QEMU_CHAR_H
+#define QEMU_CHAR_H
+
+#include "qemu-common.h"
+#include "qemu/queue.h"
+#include "qemu/option.h"
+#include "qemu/config-file.h"
+#include "block/aio.h"
+#include "qapi/qmp/qobject.h"
+#include "qapi/qmp/qstring.h"
+#include "qemu/main-loop.h"
+
+/* character device */
+
+#define CHR_EVENT_BREAK   0 /* serial break char */
+#define CHR_EVENT_FOCUS   1 /* focus to this terminal (modal input needed) */
+#define CHR_EVENT_OPENED  2 /* new connection established */
+#define CHR_EVENT_MUX_IN  3 /* mux-focus was set to this terminal */
+#define CHR_EVENT_MUX_OUT 4 /* mux-focus will move on */
+#define CHR_EVENT_CLOSED  5 /* connection closed */
+
+
+#define CHR_IOCTL_SERIAL_SET_PARAMS   1
+typedef struct {
+    int speed;
+    int parity;
+    int data_bits;
+    int stop_bits;
+} QEMUSerialSetParams;
+
+#define CHR_IOCTL_SERIAL_SET_BREAK    2
+
+#define CHR_IOCTL_PP_READ_DATA        3
+#define CHR_IOCTL_PP_WRITE_DATA       4
+#define CHR_IOCTL_PP_READ_CONTROL     5
+#define CHR_IOCTL_PP_WRITE_CONTROL    6
+#define CHR_IOCTL_PP_READ_STATUS      7
+#define CHR_IOCTL_PP_EPP_READ_ADDR    8
+#define CHR_IOCTL_PP_EPP_READ         9
+#define CHR_IOCTL_PP_EPP_WRITE_ADDR  10
+#define CHR_IOCTL_PP_EPP_WRITE       11
+#define CHR_IOCTL_PP_DATA_DIR        12
+
+#define CHR_IOCTL_SERIAL_SET_TIOCM   13
+#define CHR_IOCTL_SERIAL_GET_TIOCM   14
+
+#define CHR_TIOCM_CTS  0x020
+#define CHR_TIOCM_CAR  0x040
+#define CHR_TIOCM_DSR  0x100
+#define CHR_TIOCM_RI   0x080
+#define CHR_TIOCM_DTR  0x002
+#define CHR_TIOCM_RTS  0x004
+
+typedef void IOEventHandler(void *opaque, int event);
+
+struct CharDriverState {
+    void (*init)(struct CharDriverState *s);
+    int (*chr_write)(struct CharDriverState *s, const uint8_t *buf, int len);
+    void (*chr_update_read_handler)(struct CharDriverState *s);
+    int (*chr_ioctl)(struct CharDriverState *s, int cmd, void *arg);
+    int (*get_msgfd)(struct CharDriverState *s);
+    int (*chr_add_client)(struct CharDriverState *chr, int fd);
+    IOEventHandler *chr_event;
+    IOCanReadHandler *chr_can_read;
+    IOReadHandler *chr_read;
+    void *handler_opaque;
+    void (*chr_close)(struct CharDriverState *chr);
+    void (*chr_accept_input)(struct CharDriverState *chr);
+    void (*chr_set_echo)(struct CharDriverState *chr, bool echo);
+    void (*chr_guest_open)(struct CharDriverState *chr);
+    void (*chr_guest_close)(struct CharDriverState *chr);
+    void *opaque;
+    QEMUTimer *open_timer;
+    char *label;
+    char *filename;
+    int opened;
+    int avail_connections;
+    QTAILQ_ENTRY(CharDriverState) next;
+};
+
+/**
+ * @qemu_chr_new_from_opts:
+ *
+ * Create a new character backend from a QemuOpts list.
+ *
+ * @opts see qemu-config.c for a list of valid options
+ * @init not sure..
+ *
+ * Returns: a new character backend
+ */
+CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts,
+                                    void (*init)(struct CharDriverState *s));
+
+/**
+ * @qemu_chr_new:
+ *
+ * Create a new character backend from a URI.
+ *
+ * @label the name of the backend
+ * @filename the URI
+ * @init not sure..
+ *
+ * Returns: a new character backend
+ */
+CharDriverState *qemu_chr_new(const char *label, const char *filename,
+                              void (*init)(struct CharDriverState *s));
+
+/**
+ * @qemu_chr_delete:
+ *
+ * Destroy a character backend.
+ */
+void qemu_chr_delete(CharDriverState *chr);
+
+/**
+ * @qemu_chr_fe_set_echo:
+ *
+ * Ask the backend to override its normal echo setting.  This only really
+ * applies to the stdio backend and is used by the QMP server such that you
+ * can see what you type if you try to type QMP commands.
+ *
+ * @echo true to enable echo, false to disable echo
+ */
+void qemu_chr_fe_set_echo(struct CharDriverState *chr, bool echo);
+
+/**
+ * @qemu_chr_fe_open:
+ *
+ * Open a character backend.  This function call is an indication that the
+ * front end is ready to begin doing I/O.
+ */
+void qemu_chr_fe_open(struct CharDriverState *chr);
+
+/**
+ * @qemu_chr_fe_close:
+ *
+ * Close a character backend.  This function call indicates that the front end
+ * no longer is able to process I/O.  To process I/O again, the front end will
+ * call @qemu_chr_fe_open.
+ */
+void qemu_chr_fe_close(struct CharDriverState *chr);
+
+/**
+ * @qemu_chr_fe_printf:
+ *
+ * Write to a character backend using a printf style interface.
+ *
+ * @fmt see #printf
+ */
+void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)
+    GCC_FMT_ATTR(2, 3);
+
+/**
+ * @qemu_chr_fe_write:
+ *
+ * Write data to a character backend from the front end.  This function will
+ * send data from the front end to the back end.
+ *
+ * @buf the data
+ * @len the number of bytes to send
+ *
+ * Returns: the number of bytes consumed
+ */
+int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len);
+
+/**
+ * @qemu_chr_fe_ioctl:
+ *
+ * Issue a device specific ioctl to a backend.
+ *
+ * @cmd see CHR_IOCTL_*
+ * @arg the data associated with @cmd
+ *
+ * Returns: if @cmd is not supported by the backend, -ENOTSUP, otherwise the
+ *          return value depends on the semantics of @cmd
+ */
+int qemu_chr_fe_ioctl(CharDriverState *s, int cmd, void *arg);
+
+/**
+ * @qemu_chr_fe_get_msgfd:
+ *
+ * For backends capable of fd passing, return the latest file descriptor passed
+ * by a client.
+ *
+ * Returns: -1 if fd passing isn't supported or there is no pending file
+ *          descriptor.  If a file descriptor is returned, subsequent calls to
+ *          this function will return -1 until a client sends a new file
+ *          descriptor.
+ */
+int qemu_chr_fe_get_msgfd(CharDriverState *s);
+
+/**
+ * @qemu_chr_be_can_write:
+ *
+ * Determine how much data the front end can currently accept.  This function
+ * returns the number of bytes the front end can accept.  If it returns 0, the
+ * front end cannot receive data at the moment.  The function must be polled
+ * to determine when data can be received.
+ *
+ * Returns: the number of bytes the front end can receive via @qemu_chr_be_write
+ */
+int qemu_chr_be_can_write(CharDriverState *s);
+
+/**
+ * @qemu_chr_be_write:
+ *
+ * Write data from the back end to the front end.  Before issuing this call,
+ * the caller should call @qemu_chr_be_can_write to determine how much data
+ * the front end can currently accept.
+ *
+ * @buf a buffer to receive data from the front end
+ * @len the number of bytes to receive from the front end
+ */
+void qemu_chr_be_write(CharDriverState *s, uint8_t *buf, int len);
+
+
+/**
+ * @qemu_chr_be_event:
+ *
+ * Send an event from the back end to the front end.
+ *
+ * @event the event to send
+ */
+void qemu_chr_be_event(CharDriverState *s, int event);
+
+void qemu_chr_add_handlers(CharDriverState *s,
+                           IOCanReadHandler *fd_can_read,
+                           IOReadHandler *fd_read,
+                           IOEventHandler *fd_event,
+                           void *opaque);
+
+void qemu_chr_generic_open(CharDriverState *s);
+void qemu_chr_accept_input(CharDriverState *s);
+int qemu_chr_add_client(CharDriverState *s, int fd);
+void qemu_chr_info_print(Monitor *mon, const QObject *ret_data);
+void qemu_chr_info(Monitor *mon, QObject **ret_data);
+CharDriverState *qemu_chr_find(const char *name);
+
+QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename);
+
+/* add an eventfd to the qemu devices that are polled */
+CharDriverState *qemu_chr_open_eventfd(int eventfd);
+
+extern int term_escape_char;
+
+/* memory chardev */
+void qemu_chr_init_mem(CharDriverState *chr);
+void qemu_chr_close_mem(CharDriverState *chr);
+QString *qemu_chr_mem_to_qs(CharDriverState *chr);
+size_t qemu_chr_mem_osize(const CharDriverState *chr);
+
+CharDriverState *qemu_char_get_next_serial(void);
+
+#endif
index 200bef452fe9fafd643b113dbb57b30a7d932d83..9cf419bb1d458ccb13e4a411d63ae21e84f6fc6e 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -33,7 +33,7 @@
 #include "exec/gdbstub.h"
 #include "net/net.h"
 #include "net/slirp.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "ui/qemu-spice.h"
 #include "sysemu/sysemu.h"
 #include "monitor/monitor.h"
index 87bdc9d03100662e637d7ec4667676cde59b0324..c14259f004e3468c4d72e971dba28085330e050d 100644 (file)
@@ -35,7 +35,7 @@
 #include "monitor/monitor.h"
 #include "qemu/sockets.h"
 #include "slirp/libslirp.h"
-#include "qemu-char.h"
+#include "char/char.h"
 
 static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)
 {
index 0cbe85318e58d3194a9ed1a230b13498097fabd9..e39e6f168cb19f5fd0b581d6e454ab28e54a8b71 100644 (file)
@@ -26,7 +26,7 @@
 #include "ui/console.h"
 #include "sysemu/sysemu.h"
 #include "qemu/timer.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "hw/usb.h"
 #include "hw/baum.h"
 #include "hw/msmouse.h"
diff --git a/qemu-char.h b/qemu-char.h
deleted file mode 100644 (file)
index baa5d03..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-#ifndef QEMU_CHAR_H
-#define QEMU_CHAR_H
-
-#include "qemu-common.h"
-#include "qemu/queue.h"
-#include "qemu/option.h"
-#include "qemu/config-file.h"
-#include "block/aio.h"
-#include "qapi/qmp/qobject.h"
-#include "qapi/qmp/qstring.h"
-#include "qemu/main-loop.h"
-
-/* character device */
-
-#define CHR_EVENT_BREAK   0 /* serial break char */
-#define CHR_EVENT_FOCUS   1 /* focus to this terminal (modal input needed) */
-#define CHR_EVENT_OPENED  2 /* new connection established */
-#define CHR_EVENT_MUX_IN  3 /* mux-focus was set to this terminal */
-#define CHR_EVENT_MUX_OUT 4 /* mux-focus will move on */
-#define CHR_EVENT_CLOSED  5 /* connection closed */
-
-
-#define CHR_IOCTL_SERIAL_SET_PARAMS   1
-typedef struct {
-    int speed;
-    int parity;
-    int data_bits;
-    int stop_bits;
-} QEMUSerialSetParams;
-
-#define CHR_IOCTL_SERIAL_SET_BREAK    2
-
-#define CHR_IOCTL_PP_READ_DATA        3
-#define CHR_IOCTL_PP_WRITE_DATA       4
-#define CHR_IOCTL_PP_READ_CONTROL     5
-#define CHR_IOCTL_PP_WRITE_CONTROL    6
-#define CHR_IOCTL_PP_READ_STATUS      7
-#define CHR_IOCTL_PP_EPP_READ_ADDR    8
-#define CHR_IOCTL_PP_EPP_READ         9
-#define CHR_IOCTL_PP_EPP_WRITE_ADDR  10
-#define CHR_IOCTL_PP_EPP_WRITE       11
-#define CHR_IOCTL_PP_DATA_DIR        12
-
-#define CHR_IOCTL_SERIAL_SET_TIOCM   13
-#define CHR_IOCTL_SERIAL_GET_TIOCM   14
-
-#define CHR_TIOCM_CTS  0x020
-#define CHR_TIOCM_CAR  0x040
-#define CHR_TIOCM_DSR  0x100
-#define CHR_TIOCM_RI   0x080
-#define CHR_TIOCM_DTR  0x002
-#define CHR_TIOCM_RTS  0x004
-
-typedef void IOEventHandler(void *opaque, int event);
-
-struct CharDriverState {
-    void (*init)(struct CharDriverState *s);
-    int (*chr_write)(struct CharDriverState *s, const uint8_t *buf, int len);
-    void (*chr_update_read_handler)(struct CharDriverState *s);
-    int (*chr_ioctl)(struct CharDriverState *s, int cmd, void *arg);
-    int (*get_msgfd)(struct CharDriverState *s);
-    int (*chr_add_client)(struct CharDriverState *chr, int fd);
-    IOEventHandler *chr_event;
-    IOCanReadHandler *chr_can_read;
-    IOReadHandler *chr_read;
-    void *handler_opaque;
-    void (*chr_close)(struct CharDriverState *chr);
-    void (*chr_accept_input)(struct CharDriverState *chr);
-    void (*chr_set_echo)(struct CharDriverState *chr, bool echo);
-    void (*chr_guest_open)(struct CharDriverState *chr);
-    void (*chr_guest_close)(struct CharDriverState *chr);
-    void *opaque;
-    QEMUTimer *open_timer;
-    char *label;
-    char *filename;
-    int opened;
-    int avail_connections;
-    QTAILQ_ENTRY(CharDriverState) next;
-};
-
-/**
- * @qemu_chr_new_from_opts:
- *
- * Create a new character backend from a QemuOpts list.
- *
- * @opts see qemu-config.c for a list of valid options
- * @init not sure..
- *
- * Returns: a new character backend
- */
-CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts,
-                                    void (*init)(struct CharDriverState *s));
-
-/**
- * @qemu_chr_new:
- *
- * Create a new character backend from a URI.
- *
- * @label the name of the backend
- * @filename the URI
- * @init not sure..
- *
- * Returns: a new character backend
- */
-CharDriverState *qemu_chr_new(const char *label, const char *filename,
-                              void (*init)(struct CharDriverState *s));
-
-/**
- * @qemu_chr_delete:
- *
- * Destroy a character backend.
- */
-void qemu_chr_delete(CharDriverState *chr);
-
-/**
- * @qemu_chr_fe_set_echo:
- *
- * Ask the backend to override its normal echo setting.  This only really
- * applies to the stdio backend and is used by the QMP server such that you
- * can see what you type if you try to type QMP commands.
- *
- * @echo true to enable echo, false to disable echo
- */
-void qemu_chr_fe_set_echo(struct CharDriverState *chr, bool echo);
-
-/**
- * @qemu_chr_fe_open:
- *
- * Open a character backend.  This function call is an indication that the
- * front end is ready to begin doing I/O.
- */
-void qemu_chr_fe_open(struct CharDriverState *chr);
-
-/**
- * @qemu_chr_fe_close:
- *
- * Close a character backend.  This function call indicates that the front end
- * no longer is able to process I/O.  To process I/O again, the front end will
- * call @qemu_chr_fe_open.
- */
-void qemu_chr_fe_close(struct CharDriverState *chr);
-
-/**
- * @qemu_chr_fe_printf:
- *
- * Write to a character backend using a printf style interface.
- *
- * @fmt see #printf
- */
-void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)
-    GCC_FMT_ATTR(2, 3);
-
-/**
- * @qemu_chr_fe_write:
- *
- * Write data to a character backend from the front end.  This function will
- * send data from the front end to the back end.
- *
- * @buf the data
- * @len the number of bytes to send
- *
- * Returns: the number of bytes consumed
- */
-int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len);
-
-/**
- * @qemu_chr_fe_ioctl:
- *
- * Issue a device specific ioctl to a backend.
- *
- * @cmd see CHR_IOCTL_*
- * @arg the data associated with @cmd
- *
- * Returns: if @cmd is not supported by the backend, -ENOTSUP, otherwise the
- *          return value depends on the semantics of @cmd
- */
-int qemu_chr_fe_ioctl(CharDriverState *s, int cmd, void *arg);
-
-/**
- * @qemu_chr_fe_get_msgfd:
- *
- * For backends capable of fd passing, return the latest file descriptor passed
- * by a client.
- *
- * Returns: -1 if fd passing isn't supported or there is no pending file
- *          descriptor.  If a file descriptor is returned, subsequent calls to
- *          this function will return -1 until a client sends a new file
- *          descriptor.
- */
-int qemu_chr_fe_get_msgfd(CharDriverState *s);
-
-/**
- * @qemu_chr_be_can_write:
- *
- * Determine how much data the front end can currently accept.  This function
- * returns the number of bytes the front end can accept.  If it returns 0, the
- * front end cannot receive data at the moment.  The function must be polled
- * to determine when data can be received.
- *
- * Returns: the number of bytes the front end can receive via @qemu_chr_be_write
- */
-int qemu_chr_be_can_write(CharDriverState *s);
-
-/**
- * @qemu_chr_be_write:
- *
- * Write data from the back end to the front end.  Before issuing this call,
- * the caller should call @qemu_chr_be_can_write to determine how much data
- * the front end can currently accept.
- *
- * @buf a buffer to receive data from the front end
- * @len the number of bytes to receive from the front end
- */
-void qemu_chr_be_write(CharDriverState *s, uint8_t *buf, int len);
-
-
-/**
- * @qemu_chr_be_event:
- *
- * Send an event from the back end to the front end.
- *
- * @event the event to send
- */
-void qemu_chr_be_event(CharDriverState *s, int event);
-
-void qemu_chr_add_handlers(CharDriverState *s,
-                           IOCanReadHandler *fd_can_read,
-                           IOReadHandler *fd_read,
-                           IOEventHandler *fd_event,
-                           void *opaque);
-
-void qemu_chr_generic_open(CharDriverState *s);
-void qemu_chr_accept_input(CharDriverState *s);
-int qemu_chr_add_client(CharDriverState *s, int fd);
-void qemu_chr_info_print(Monitor *mon, const QObject *ret_data);
-void qemu_chr_info(Monitor *mon, QObject **ret_data);
-CharDriverState *qemu_chr_find(const char *name);
-
-QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename);
-
-/* add an eventfd to the qemu devices that are polled */
-CharDriverState *qemu_chr_open_eventfd(int eventfd);
-
-extern int term_escape_char;
-
-/* memory chardev */
-void qemu_chr_init_mem(CharDriverState *chr);
-void qemu_chr_close_mem(CharDriverState *chr);
-QString *qemu_chr_mem_to_qs(CharDriverState *chr);
-size_t qemu_chr_mem_osize(const CharDriverState *chr);
-
-CharDriverState *qemu_char_get_next_serial(void);
-
-#endif
diff --git a/qmp.c b/qmp.c
index be63fe10296b31e25064882bb1c896d1e7b9f8b8..55b056b558bd44117df7e7301b3cde31e7c0a608 100644 (file)
--- a/qmp.c
+++ b/qmp.c
@@ -16,7 +16,7 @@
 #include "qemu-common.h"
 #include "sysemu/sysemu.h"
 #include "qmp-commands.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "ui/qemu-spice.h"
 #include "ui/vnc.h"
 #include "sysemu/kvm.h"
diff --git a/qtest.c b/qtest.c
index 468c921310c12d9d3e5dbfa85acbf908b4c1d72a..c9b58ceb8b1b9c506c91692d9a2740c2a98fa008 100644 (file)
--- a/qtest.c
+++ b/qtest.c
@@ -13,7 +13,7 @@
 
 #include "sysemu/qtest.h"
 #include "hw/qdev.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "exec/ioport.h"
 #include "exec/memory.h"
 #include "hw/irq.h"
index 4b51a67e7de51aa7fb916d0eb4bbde78efe4fd03..e93b5788327ed4e23337560413c0838c6d7a06e8 100644 (file)
@@ -23,7 +23,7 @@
  */
 #include "qemu-common.h"
 #include "qemu/timer.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "slirp.h"
 #include "hw/hw.h"
 
index 41b1657ccd70bf1760db8b16aaad576c24332e8b..4b03143f68e7466f0a8e26beab8a3214ba99e3f0 100644 (file)
@@ -1,7 +1,7 @@
 #include "config-host.h"
 #include "trace.h"
 #include "ui/qemu-spice.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include <spice.h>
 #include <spice-experimental.h>
 
index a4bff8ce8a961db16ec0ecd8283027de4032d3e6..d880ebff07e4ddd1f8a02371a51850c33d6cc2ed 100644 (file)
@@ -25,7 +25,7 @@
 #include "ui/console.h"
 #include "qemu/timer.h"
 #include "qmp-commands.h"
-#include "qemu-char.h"
+#include "char/char.h"
 
 //#define DEBUG_CONSOLE
 #define DEFAULT_BACKSCROLL 512
diff --git a/vl.c b/vl.c
index 75a30a17201af9d8dad74195279a191de1dc1081..e6a8d89accf924dfebebd7262fbb54648a83945e 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -126,7 +126,7 @@ int main(int argc, char **argv)
 #include "hw/xen.h"
 #include "hw/qdev.h"
 #include "hw/loader.h"
-#include "bt-host.h"
+#include "bt/bt.h"
 #include "net/net.h"
 #include "net/slirp.h"
 #include "monitor/monitor.h"
@@ -134,7 +134,7 @@ int main(int argc, char **argv)
 #include "sysemu/sysemu.h"
 #include "exec/gdbstub.h"
 #include "qemu/timer.h"
-#include "qemu-char.h"
+#include "char/char.h"
 #include "qemu/cache-utils.h"
 #include "sysemu/blockdev.h"
 #include "hw/block-common.h"