From patchwork Wed Feb 22 21:09:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v5,3/9] console: don't call console_select unnecessarily Date: Wed, 22 Feb 2012 11:09:35 -0000 From: Alon Levy X-Patchwork-Id: 142540 Message-Id: <1329944981-28311-4-git-send-email-alevy@redhat.com> To: qemu-devel@nongnu.org, kraxel@redhat.com Cc: yhalperi@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); } }