[Spice-devel] [RFC v4 1/9] console: don't call console_select unnecessarily
Alon Levy
alevy at redhat.com
Tue Feb 21 13:39:29 PST 2012
From: Gerd Hoffman <kraxel at redhat.com>
Tested-by: Alon Levy <alevy at redhat.com>
---
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
More information about the Spice-devel
mailing list