diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-16 20:23:27 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-16 20:23:27 +0000 |
commit | 2796dae08aad498fa54a131ce23d15b346df85ac (patch) | |
tree | 5d3eb2885b20f7b94732af7fcd709112b842629e /qemu-char.c | |
parent | 5403281aeb49acd985de45a585162abf749497dd (diff) | |
download | qemu-2796dae08aad498fa54a131ce23d15b346df85ac.tar.gz qemu-2796dae08aad498fa54a131ce23d15b346df85ac.tar.bz2 qemu-2796dae08aad498fa54a131ce23d15b346df85ac.zip |
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 <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6352 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-char.c')
-rw-r--r-- | qemu-char.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-char.c b/qemu-char.c index 1e2fda5659..02d4049d0c 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2128,10 +2128,10 @@ CharDriverState *qemu_chr_open(const char *label, const char *filename) CharDriverState *chr; if (!strcmp(filename, "vc")) { - chr = text_console_init(get_displaystate(), 0); + chr = text_console_init(0); } else if (strstart(filename, "vc:", &p)) { - chr = text_console_init(get_displaystate(), p); + chr = text_console_init(p); } else if (!strcmp(filename, "null")) { chr = qemu_chr_open_null(); |