aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-02-02 09:50:21 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-02-02 09:50:21 +0000
commit2d6752d38d8acda6aae674a72b72be05482a58eb (patch)
tree9d35c5a56135b95194c1c439232125deb1fee73a /ui
parent6fe791b5e3aca8a6de8a322e85e76d2f13338a7e (diff)
parent213dcb060f77a3e2704135d9c4da38b11673f8e9 (diff)
Merge remote-tracking branch 'remotes/elmarco/tags/chr-split-pull-request' into staging
# gpg: Signature made Tue 31 Jan 2017 19:32:40 GMT # gpg: using RSA key 0xDAE8E10975969CE5 # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/elmarco/tags/chr-split-pull-request: (41 commits) char: headers clean-up char: move parallel chardev in its own file char: move serial chardev to its own file char: move pty chardev in its own file char: move pipe chardev in its own file char: move console in its own file char: move stdio in its own file char: move file chardev in its own file char: move udp chardev in its own file char: move socket chardev to its own file char: move win-stdio into its own file char: move win chardev base class in its own file char: move fd chardev in its own file char: move QIOChannel-related stuff to char-io.h char: remove unused READ_RETRIES char: rename and move to header CHR_READ_BUF_LEN char: move ringbuf/memory to its own file char: move mux to its own file char: move null chardev to its own file char: make null_chr_write() the default method ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/console.c10
-rw-r--r--ui/gtk.c9
2 files changed, 3 insertions, 16 deletions
diff --git a/ui/console.c b/ui/console.c
index e353c85681..49d0740b40 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2059,8 +2059,6 @@ static void text_console_do_init(Chardev *chr, DisplayState *ds)
qemu_chr_be_generic_open(chr);
}
-static const CharDriver vc_driver;
-
static void vc_chr_open(Chardev *chr,
ChardevBackend *backend,
bool *be_opened,
@@ -2150,6 +2148,7 @@ void qemu_chr_parse_vc(QemuOpts *opts, ChardevBackend *backend, Error **errp)
int val;
ChardevVC *vc;
+ backend->type = CHARDEV_BACKEND_KIND_VC;
vc = backend->u.vc.data = g_new0(ChardevVC, 1);
qemu_chr_parse_common(opts, qapi_ChardevVC_base(vc));
@@ -2189,6 +2188,7 @@ static void char_vc_class_init(ObjectClass *oc, void *data)
{
ChardevClass *cc = CHARDEV_CLASS(oc);
+ cc->parse = qemu_chr_parse_vc;
cc->open = vc_chr_open;
cc->chr_write = vc_chr_write;
cc->chr_set_echo = vc_chr_set_echo;
@@ -2206,15 +2206,9 @@ void qemu_console_early_init(void)
/* set the default vc driver */
if (!object_class_by_name(TYPE_CHARDEV_VC)) {
type_register(&char_vc_type_info);
- register_char_driver(&vc_driver);
}
}
-static const CharDriver vc_driver = {
- .kind = CHARDEV_BACKEND_KIND_VC,
- .parse = qemu_chr_parse_vc,
-};
-
static void register_types(void)
{
type_register_static(&qemu_console_info);
diff --git a/ui/gtk.c b/ui/gtk.c
index ca50772749..f21e9e7f7b 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1739,8 +1739,6 @@ static void gd_vc_chr_set_echo(Chardev *chr, bool echo)
static int nb_vcs;
static Chardev *vcs[MAX_VCS];
-static const CharDriver gd_vc_driver;
-
static void gd_vc_open(Chardev *chr,
ChardevBackend *backend,
bool *be_opened,
@@ -1763,6 +1761,7 @@ static void char_gd_vc_class_init(ObjectClass *oc, void *data)
{
ChardevClass *cc = CHARDEV_CLASS(oc);
+ cc->parse = qemu_chr_parse_vc;
cc->open = gd_vc_open;
cc->chr_write = gd_vc_chr_write;
cc->chr_set_echo = gd_vc_chr_set_echo;
@@ -1775,11 +1774,6 @@ static const TypeInfo char_gd_vc_type_info = {
.class_init = char_gd_vc_class_init,
};
-static const CharDriver gd_vc_driver = {
- .kind = CHARDEV_BACKEND_KIND_VC,
- .parse = qemu_chr_parse_vc,
-};
-
static gboolean gd_vc_in(VteTerminal *terminal, gchar *text, guint size,
gpointer user_data)
{
@@ -2383,6 +2377,5 @@ void early_gtk_display_init(int opengl)
#if defined(CONFIG_VTE)
type_register(&char_gd_vc_type_info);
- register_char_driver(&gd_vc_driver);
#endif
}