From 6b10e573d15ef82dbc5c5b3726028e6642e134f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 29 May 2017 12:39:42 +0400 Subject: [PATCH] char: move char devices to chardev/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suggested by Paolo Bonzini during series review. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- MAINTAINERS | 4 +--- Makefile.objs | 4 ++-- backends/Makefile.objs | 4 ---- backends/trace-events | 10 ---------- chardev/Makefile.objs | 6 ++++++ {backends => chardev}/baum.c | 0 {backends => chardev}/msmouse.c | 0 spice-qemu-char.c => chardev/spice.c | 2 +- {backends => chardev}/testdev.c | 0 chardev/trace-events | 18 ++++++++++++++++++ {backends => chardev}/wctablet.c | 0 trace-events | 7 ------- 12 files changed, 28 insertions(+), 27 deletions(-) rename {backends => chardev}/baum.c (100%) rename {backends => chardev}/msmouse.c (100%) rename spice-qemu-char.c => chardev/spice.c (99%) rename {backends => chardev}/testdev.c (100%) create mode 100644 chardev/trace-events rename {backends => chardev}/wctablet.c (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 48e2964ed8..120788d8fb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1239,13 +1239,11 @@ M: Marc-André Lureau S: Maintained F: chardev/ F: include/chardev/ -F: backends/msmouse.c -F: backends/testdev.c Character Devices (Braille) M: Samuel Thibault S: Maintained -F: backends/baum.c +F: chardev/baum.c Command line option argument parsing M: Markus Armbruster diff --git a/Makefile.objs b/Makefile.objs index 2100845ce2..0575802440 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -50,8 +50,6 @@ common-obj-$(CONFIG_LINUX) += fsdev/ common-obj-y += migration/ -common-obj-$(CONFIG_SPICE) += spice-qemu-char.o - common-obj-y += audio/ common-obj-y += hw/ common-obj-y += accel.o @@ -70,6 +68,7 @@ common-obj-y += tpm.o common-obj-$(CONFIG_SLIRP) += slirp/ common-obj-y += backends/ +common-obj-y += chardev/ common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o @@ -121,6 +120,7 @@ trace-events-subdirs += io trace-events-subdirs += migration trace-events-subdirs += block trace-events-subdirs += backends +trace-events-subdirs += chardev trace-events-subdirs += hw/block trace-events-subdirs += hw/block/dataplane trace-events-subdirs += hw/char diff --git a/backends/Makefile.objs b/backends/Makefile.objs index 0e0f1567b2..0400799efd 100644 --- a/backends/Makefile.objs +++ b/backends/Makefile.objs @@ -1,10 +1,6 @@ common-obj-y += rng.o rng-egd.o common-obj-$(CONFIG_POSIX) += rng-random.o -common-obj-y += msmouse.o wctablet.o testdev.o -common-obj-$(CONFIG_BRLAPI) += baum.o -baum.o-cflags := $(SDL_CFLAGS) - common-obj-$(CONFIG_TPM) += tpm.o common-obj-y += hostmem.o hostmem-ram.o diff --git a/backends/trace-events b/backends/trace-events index 8c3289a3f9..e69de29bb2 100644 --- a/backends/trace-events +++ b/backends/trace-events @@ -1,10 +0,0 @@ -# See docs/tracing.txt for syntax documentation. - -# backends/wctablet.c -wct_init(void) "" -wct_cmd_re(void) "" -wct_cmd_st(void) "" -wct_cmd_sp(void) "" -wct_cmd_ts(int input) "0x%02x" -wct_cmd_other(const char *cmd) "%s" -wct_speed(int speed) "%d" diff --git a/chardev/Makefile.objs b/chardev/Makefile.objs index e0b37dbfd8..52a8127606 100644 --- a/chardev/Makefile.objs +++ b/chardev/Makefile.objs @@ -16,3 +16,9 @@ chardev-obj-y += char-stdio.o chardev-obj-y += char-udp.o chardev-obj-$(CONFIG_WIN32) += char-win.o chardev-obj-$(CONFIG_WIN32) += char-win-stdio.o + +common-obj-y += msmouse.o wctablet.o testdev.o +common-obj-$(CONFIG_BRLAPI) += baum.o +baum.o-cflags := $(SDL_CFLAGS) + +common-obj-$(CONFIG_SPICE) += spice.o diff --git a/backends/baum.c b/chardev/baum.c similarity index 100% rename from backends/baum.c rename to chardev/baum.c diff --git a/backends/msmouse.c b/chardev/msmouse.c similarity index 100% rename from backends/msmouse.c rename to chardev/msmouse.c diff --git a/spice-qemu-char.c b/chardev/spice.c similarity index 99% rename from spice-qemu-char.c rename to chardev/spice.c index 1c6c2e3969..a312078812 100644 --- a/spice-qemu-char.c +++ b/chardev/spice.c @@ -1,5 +1,5 @@ #include "qemu/osdep.h" -#include "trace-root.h" +#include "trace.h" #include "ui/qemu-spice.h" #include "chardev/char.h" #include "qemu/error-report.h" diff --git a/backends/testdev.c b/chardev/testdev.c similarity index 100% rename from backends/testdev.c rename to chardev/testdev.c diff --git a/chardev/trace-events b/chardev/trace-events new file mode 100644 index 0000000000..822dde668b --- /dev/null +++ b/chardev/trace-events @@ -0,0 +1,18 @@ +# See docs/tracing.txt for syntax documentation. + +# chardev/wctablet.c +wct_init(void) "" +wct_cmd_re(void) "" +wct_cmd_st(void) "" +wct_cmd_sp(void) "" +wct_cmd_ts(int input) "0x%02x" +wct_cmd_other(const char *cmd) "%s" +wct_speed(int speed) "%d" + +# chardev/spice.c +spice_vmc_write(ssize_t out, int len) "spice wrote %zd of requested %d" +spice_vmc_read(int bytes, int len) "spice read %d of requested %d" +spice_vmc_register_interface(void *scd) "spice vmc registered interface %p" +spice_vmc_unregister_interface(void *scd) "spice vmc unregistered interface %p" +spice_vmc_event(int event) "spice vmc event %d" + diff --git a/backends/wctablet.c b/chardev/wctablet.c similarity index 100% rename from backends/wctablet.c rename to chardev/wctablet.c diff --git a/trace-events b/trace-events index 433865fa97..d7a4d94168 100644 --- a/trace-events +++ b/trace-events @@ -41,13 +41,6 @@ system_wakeup_request(int reason) "reason=%d" qemu_system_shutdown_request(int reason) "reason=%d" qemu_system_powerdown_request(void) "" -# spice-qemu-char.c -spice_vmc_write(ssize_t out, int len) "spice wrote %zd of requested %d" -spice_vmc_read(int bytes, int len) "spice read %d of requested %d" -spice_vmc_register_interface(void *scd) "spice vmc registered interface %p" -spice_vmc_unregister_interface(void *scd) "spice vmc unregistered interface %p" -spice_vmc_event(int event) "spice vmc event %d" - # monitor.c monitor_protocol_event_handler(uint32_t event, void *qdict) "event=%d data=%p" monitor_protocol_event_emit(uint32_t event, void *data) "event=%d data=%p"