From d82831dbc5471d72785c49b33710436af49bf9ca Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Wed, 20 Feb 2013 07:43:19 -0600 Subject: 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 Message-id: 1361367806-4599-3-git-send-email-aliguori@us.ibm.com --- ui/console.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'ui/console.c') 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; -- cgit v1.2.1