From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNvp8-0006Qy-J6 for qemu-devel@nongnu.org; Fri, 16 Jan 2009 16:01:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNvp8-0006QB-0U for qemu-devel@nongnu.org; Fri, 16 Jan 2009 16:01:50 -0500 Received: from [199.232.76.173] (port=33605 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNvp7-0006Q0-Sw for qemu-devel@nongnu.org; Fri, 16 Jan 2009 16:01:49 -0500 Received: from savannah.gnu.org ([199.232.41.3]:35428 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LNvp7-0004vz-Fb for qemu-devel@nongnu.org; Fri, 16 Jan 2009 16:01:49 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LNvp6-0003Dp-TI for qemu-devel@nongnu.org; Fri, 16 Jan 2009 21:01:48 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LNvp6-0003Dl-KD for qemu-devel@nongnu.org; Fri, 16 Jan 2009 21:01:48 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Fri, 16 Jan 2009 21:01:48 +0000 Subject: [Qemu-devel] [6353] Remove assumption about a single graphic console. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6353 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6353 Author: aliguori Date: 2009-01-16 21:01:48 +0000 (Fri, 16 Jan 2009) Log Message: ----------- Remove assumption about a single graphic console. This fixes a fault with the jazz_led since it has two graphic consoles. Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/console.c Modified: trunk/console.c =================================================================== --- trunk/console.c 2009-01-16 20:23:27 UTC (rev 6352) +++ trunk/console.c 2009-01-16 21:01:48 UTC (rev 6353) @@ -1190,13 +1190,13 @@ } } -static TextConsole *get_graphic_console(void) +static TextConsole *get_graphic_console(DisplayState *ds) { int i; TextConsole *s; for (i = 0; i < nb_consoles; i++) { s = consoles[i]; - if (s->console_type == GRAPHIC_CONSOLE) + if (s->console_type == GRAPHIC_CONSOLE && s->ds == ds) return s; } return NULL; @@ -1394,7 +1394,7 @@ void qemu_console_resize(DisplayState *ds, int width, int height) { - TextConsole *s = get_graphic_console(); + TextConsole *s = get_graphic_console(ds); s->g_width = width; s->g_height = height; if (is_graphic_console()) {