From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzxRA-00080t-6V for qemu-devel@nongnu.org; Tue, 21 Feb 2012 16:39:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzxR5-0005fq-AV for qemu-devel@nongnu.org; Tue, 21 Feb 2012 16:39:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzxR5-0005fZ-1u for qemu-devel@nongnu.org; Tue, 21 Feb 2012 16:39:47 -0500 From: Alon Levy Date: Tue, 21 Feb 2012 23:39:29 +0200 Message-Id: <1329860377-6284-2-git-send-email-alevy@redhat.com> In-Reply-To: <1329860377-6284-1-git-send-email-alevy@redhat.com> References: <1329860377-6284-1-git-send-email-alevy@redhat.com> Subject: [Qemu-devel] [RFC v4 1/9] console: don't call console_select unnecessarily List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, kraxel@redhat.com, spice-devel@freedesktop.org, yhalperi@redhat.com, elmarco@redhat.com 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); } } -- 1.7.9.1