aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-02-20 07:43:19 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2013-02-21 16:34:48 -0600
commitd82831dbc5471d72785c49b33710436af49bf9ca (patch)
tree3a04247a25901c16977422d4ab95d96ec4b8a28b /ui
parent22bc9a46bda8f5f88626d3fb578f5d55953c9743 (diff)
console: allow VCs to be overridden by UI
We want to expose VCs using a VteTerminal widget. We need access to provide our own CharDriverState in order to do this. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1361367806-4599-3-git-send-email-aliguori@us.ibm.com
Diffstat (limited to 'ui')
-rw-r--r--ui/console.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/ui/console.c b/ui/console.c
index 25e06a5cb3..0d95f32123 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1537,7 +1537,7 @@ static void text_console_do_init(CharDriverState *chr, DisplayState *ds)
chr->init(chr);
}
-CharDriverState *text_console_init(QemuOpts *opts)
+static CharDriverState *text_console_init(QemuOpts *opts)
{
CharDriverState *chr;
QemuConsole *s;
@@ -1573,6 +1573,18 @@ CharDriverState *text_console_init(QemuOpts *opts)
return chr;
}
+static VcHandler *vc_handler = text_console_init;
+
+CharDriverState *vc_init(QemuOpts *opts)
+{
+ return vc_handler(opts);
+}
+
+void register_vc_handler(VcHandler *handler)
+{
+ vc_handler = handler;
+}
+
void text_consoles_set_display(DisplayState *ds)
{
int i;