From patchwork Tue Nov 22 01:26:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mars.cao" X-Patchwork-Id: 126983 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 98F02B70C8 for ; Tue, 22 Nov 2011 12:27:24 +1100 (EST) Received: from localhost ([::1]:51422 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSf8q-0001rk-6g for incoming@patchwork.ozlabs.org; Mon, 21 Nov 2011 20:27:20 -0500 Received: from eggs.gnu.org ([140.186.70.92]:36285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSf8j-0001r3-SK for qemu-devel@nongnu.org; Mon, 21 Nov 2011 20:27:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSf8e-0004fa-AS for qemu-devel@nongnu.org; Mon, 21 Nov 2011 20:27:13 -0500 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:40583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSf8d-0004er-KJ for qemu-devel@nongnu.org; Mon, 21 Nov 2011 20:27:08 -0500 Received: from /spool/local by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 22 Nov 2011 01:24:48 +1000 Received: from d23relay05.au.ibm.com ([202.81.31.247]) by e23smtp05.au.ibm.com ([202.81.31.211]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 22 Nov 2011 01:24:42 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAM1NHd43555550 for ; Tue, 22 Nov 2011 12:23:24 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAM1QXkH028054 for ; Tue, 22 Nov 2011 12:26:34 +1100 Received: from oc2115466153.ibm.com ([9.115.122.76]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pAM1QW0K028018; Tue, 22 Nov 2011 12:26:32 +1100 Message-ID: <4ECAFA3D.90309@linux.vnet.ibm.com> Date: Tue, 22 Nov 2011 09:26:21 +0800 From: "Cao,Bing Bu" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111104 Red Hat/3.1.16-2.el6_1 Thunderbird/3.1.16 MIME-Version: 1.0 To: armbru@redhat.com, pbonzini@redhat.com References: <4EC8DE54.20802@redhat.com> In-Reply-To: <4EC8DE54.20802@redhat.com> x-cbid: 11112115-1396-0000-0000-00000046BD76 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 202.81.31.147 Cc: "Cao, Bing Bu" , QEMU Developers Subject: [Qemu-devel] [PATCH][V2] Can't screendump without a console X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org When usinge "-vga none -nographic" option. There is no any text and graphic console created in this case. screen dump not supported without console. Signed-off-by: Cao,Bing Bu --- console.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/console.c b/console.c index f6fe441..6071ef3 100644 --- a/console.c +++ b/console.c @@ -184,8 +184,10 @@ 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 { + error_printf("no any console,could not screen dump \n"); + return; } - console_select(previous_active_console->index); }