From patchwork Wed Feb 22 21:09:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 142540 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 829DBB6FAB for ; Thu, 23 Feb 2012 08:57:33 +1100 (EST) Received: from localhost ([::1]:56998 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0JSE-0004sZ-IZ for incoming@patchwork.ozlabs.org; Wed, 22 Feb 2012 16:10:26 -0500 Received: from eggs.gnu.org ([140.186.70.92]:49372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0JS1-0004gV-Le for qemu-devel@nongnu.org; Wed, 22 Feb 2012 16:10:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0JRz-0006nv-UQ for qemu-devel@nongnu.org; Wed, 22 Feb 2012 16:10:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0JRz-0006no-Hk for qemu-devel@nongnu.org; Wed, 22 Feb 2012 16:10:11 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1MLAA1J022794 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 22 Feb 2012 16:10:10 -0500 Received: from garlic.redhat.com (vpn-200-29.tlv.redhat.com [10.35.200.29]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1ML9hMq009444; Wed, 22 Feb 2012 16:10:04 -0500 From: Alon Levy To: qemu-devel@nongnu.org, kraxel@redhat.com Date: Wed, 22 Feb 2012 23:09:35 +0200 Message-Id: <1329944981-28311-4-git-send-email-alevy@redhat.com> In-Reply-To: <1329944981-28311-1-git-send-email-alevy@redhat.com> References: <1329944981-28311-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: yhalperi@redhat.com Subject: [Qemu-devel] [PATCH v5 3/9] console: don't call console_select unnecessarily 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 From: Gerd Hoffman Tested-by: Alon Levy --- console.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/console.c b/console.c index 135394f..cfcc2f7 100644 --- a/console.c +++ b/console.c @@ -181,12 +181,14 @@ void vga_hw_screen_dump(const char *filename) /* There is currently no way of specifying which screen we want to dump, so always dump the first one. */ - console_select(0); + if (previous_active_console && previous_active_console->index != 0) { + console_select(0); + } if (consoles[0] && consoles[0]->hw_screen_dump) { consoles[0]->hw_screen_dump(consoles[0]->hw, filename); } - if (previous_active_console) { + if (previous_active_console && previous_active_console->index != 0) { console_select(previous_active_console->index); } }