From 2796dae08aad498fa54a131ce23d15b346df85ac Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 16 Jan 2009 20:23:27 +0000 Subject: Fix character devices after DisplayState refactoring The DisplayState refactoring changed the machine init function to create a DisplayState for each VGA device instead of being passed an existing DisplayState. This change is critical to enable multiple graphics device support. Unfortunately, the serial/parallel/console code is structured today to run before machine init to fill out the CharDriverState table which the machine init function uses to determine whether to create the required devices. Since a 'vc' is a type of CharDriverState, the CharDriverState code requires that a DisplayState exist before it runs creating a circular dependency. To fix this, this splits the creation of the initial CharDriverState from the initialization of the text console. We can then in a second step associate a DisplayState with all TextConsoles. This allows us to create the CharDriverState's first, machine init, then associate the TextConsoles with a DisplayState. This code screams for more cleanup. Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6352 c046a42c-6fe2-441c-8c8c-71466251a162 --- console.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'console.h') diff --git a/console.h b/console.h index 3ac0afa..383ea1a 100644 --- a/console.h +++ b/console.h @@ -265,7 +265,8 @@ void vga_hw_text_update(console_ch_t *chardata); int is_graphic_console(void); int is_fixedsize_console(void); -CharDriverState *text_console_init(DisplayState *ds, const char *p); +CharDriverState *text_console_init(const char *p); +void text_consoles_set_display(DisplayState *ds); void console_select(unsigned int index); void console_color_init(DisplayState *ds); void qemu_console_resize(DisplayState *ds, int width, int height); -- cgit v1.1