Patchwork [17/19] qemu-char: move text console init to console.c

login
register
mail settings
Submitter Anthony Liguori
Date Feb. 18, 2013, 9:48 p.m.
Message ID <1361224096-21075-18-git-send-email-aliguori@us.ibm.com>
Download mbox | patch
Permalink /patch/221557/
State New
Headers show

Comments

Anthony Liguori - Feb. 18, 2013, 9:48 p.m.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 include/ui/console.h | 1 -
 qemu-char.c          | 1 -
 ui/console.c         | 9 ++++++++-
 3 files changed, 8 insertions(+), 3 deletions(-)

Patch

diff --git a/include/ui/console.h b/include/ui/console.h
index fc23baa..abc8652 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -442,7 +442,6 @@  void vga_hw_text_update(console_ch_t *chardata);
 
 int is_graphic_console(void);
 int is_fixedsize_console(void);
-CharDriverState *text_console_init(QemuOpts *opts);
 void text_consoles_set_display(DisplayState *ds);
 void console_select(unsigned int index);
 void console_color_init(DisplayState *ds);
diff --git a/qemu-char.c b/qemu-char.c
index 3a2f279..e533ef1 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3658,7 +3658,6 @@  static void register_types(void)
     register_char_driver("null", qemu_chr_open_null);
     register_char_driver("socket", qemu_chr_open_socket);
     register_char_driver("udp", qemu_chr_open_udp);
-    register_char_driver("vc", text_console_init);
     register_char_driver("memory", qemu_chr_open_ringbuf);
 #ifdef _WIN32
     register_char_driver("file", qemu_chr_open_win_file_out);
diff --git a/ui/console.c b/ui/console.c
index 0a68836..71dda4a 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1532,7 +1532,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;
@@ -1722,3 +1722,10 @@  PixelFormat qemu_default_pixelformat(int bpp)
     }
     return pf;
 }
+
+static void register_types(void)
+{
+    register_char_driver("vc", text_console_init);
+}
+
+type_init(register_types);