[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/19] console: Eliminate text_consoles[]
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH 14/19] console: Eliminate text_consoles[] |
Date: |
Tue, 7 Feb 2012 15:09:21 +0100 |
Simply use consoles[] instead.
Signed-off-by: Markus Armbruster <address@hidden>
---
console.c | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/console.c b/console.c
index 2c432e3..744ef2d 100644
--- a/console.c
+++ b/console.c
@@ -1441,9 +1441,6 @@ void console_color_init(DisplayState *ds)
}
}
-static int n_text_consoles;
-static CharDriverState *text_consoles[128];
-
static void text_console_set_echo(CharDriverState *chr, bool echo)
{
TextConsole *s = chr->opaque;
@@ -1519,13 +1516,6 @@ CharDriverState *text_console_init(QemuOpts *opts)
chr = g_malloc0(sizeof(CharDriverState));
- if (n_text_consoles == 128) {
- fprintf(stderr, "Too many text consoles\n");
- exit(1);
- }
- text_consoles[n_text_consoles] = chr;
- n_text_consoles++;
-
width = qemu_opt_get_number(opts, "width", 0);
if (width == 0)
width = qemu_opt_get_number(opts, "cols", 0) * FONT_WIDTH;
@@ -1557,11 +1547,11 @@ void text_consoles_set_display(DisplayState *ds)
{
int i;
- for (i = 0; i < n_text_consoles; i++) {
- text_console_do_init(text_consoles[i], ds);
+ for (i = 0; i < nb_consoles; i++) {
+ if (consoles[i]->console_type != GRAPHIC_CONSOLE) {
+ text_console_do_init(consoles[i]->chr, ds);
+ }
}
-
- n_text_consoles = 0;
}
void qemu_console_resize(DisplayState *ds, int width, int height)
--
1.7.6.5
- [Qemu-devel] [PATCH 02/19] qemu-char: Use qemu_open() to avoid leaking fds to children, (continued)
- [Qemu-devel] [PATCH 02/19] qemu-char: Use qemu_open() to avoid leaking fds to children, Markus Armbruster, 2012/02/07
- [Qemu-devel] [PATCH 13/19] qemu-char: Chardev open error reporting, parport part, Markus Armbruster, 2012/02/07
- [Qemu-devel] [PATCH 08/19] sockets: Clean up inet_listen_opts()'s convoluted bind() loop, Markus Armbruster, 2012/02/07
- [Qemu-devel] [PATCH 04/19] qemu-char: qemu_chr_open_fd() can't fail, don't check, Markus Armbruster, 2012/02/07
- [Qemu-devel] [PATCH 07/19] sockets: Drop sockets_debug debug code, Markus Armbruster, 2012/02/07
- [Qemu-devel] [PATCH 06/19] gdbstub: Error locations for -gdb, Markus Armbruster, 2012/02/07
- [Qemu-devel] [PATCH 14/19] console: Eliminate text_consoles[],
Markus Armbruster <=
- [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Markus Armbruster, 2012/02/07
- Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Kevin Wolf, 2012/02/07
- Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Markus Armbruster, 2012/02/09
- Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Kevin Wolf, 2012/02/09
- Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Markus Armbruster, 2012/02/09
- Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Luiz Capitulino, 2012/02/09
- Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Markus Armbruster, 2012/02/09
[Qemu-devel] [PATCH 03/19] qemu-char: Re-apply style fixes from just reverted aad04cd0, Markus Armbruster, 2012/02/07
[Qemu-devel] [PATCH 17/19] baum: Chardev open error reporting, braille part, Markus Armbruster, 2012/02/07