From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RS3kH-0001xi-64 for qemu-devel@nongnu.org; Sun, 20 Nov 2011 04:31:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RS3kG-0001iU-EK for qemu-devel@nongnu.org; Sun, 20 Nov 2011 04:31:29 -0500 Received: from [118.186.202.5] (port=61401 helo=oc2115466153.ibm.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RS3kF-0001iQ-U8 for qemu-devel@nongnu.org; Sun, 20 Nov 2011 04:31:28 -0500 From: "Cao,Bing Bu" Date: Sun, 20 Nov 2011 17:31:08 +0800 Message-Id: <1321781468-11126-1-git-send-email-mars@linux.vnet.ibm.com> In-Reply-To: <1321631238-17330-1-git-send-email-agraf@suse.de> References: <1321631238-17330-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH] creen dump not supported when no console List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Cao,Bing Bu" I have tested the issue use "-vga none -nographic" option. QEMU segment faults. But i think there is no any text and graphic console created in this case. The console[0] is NULL. The vga_hw_screen_dump() should return before console_select(). What do you think? --- console.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/console.c b/console.c index f6fe441..957948e 100644 --- a/console.c +++ b/console.c @@ -184,6 +184,9 @@ void vga_hw_screen_dump(const char *filename) console_select(0); if (consoles[0] && consoles[0]->hw_screen_dump) { consoles[0]->hw_screen_dump(consoles[0]->hw, filename); + } else { + fprintf(stderr,"no any console,could not screen dump \n"); + return; } console_select(previous_active_console->index); -- 1.7.1