|
|
e76f14 |
From 43c9804c2b433687b6ed31288be50d91d881c74a Mon Sep 17 00:00:00 2001
|
|
|
e76f14 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
e76f14 |
Date: Fri, 1 Apr 2016 10:05:59 +0100
|
|
|
e76f14 |
Subject: [PATCH] launch: Only use sgabios when verbose is enabled.
|
|
|
e76f14 |
|
|
|
e76f14 |
The sgabios option ROM is slow. Only use it when we're debugging.
|
|
|
e76f14 |
|
|
|
e76f14 |
Thanks: Paolo Bonzini.
|
|
|
e76f14 |
(cherry picked from commit 6c99a17dc56ab0479b439dece549c89960b21ccc)
|
|
|
e76f14 |
---
|
|
|
e76f14 |
src/launch-direct.c | 3 ++-
|
|
|
e76f14 |
src/launch-libvirt.c | 8 +++++---
|
|
|
e76f14 |
2 files changed, 7 insertions(+), 4 deletions(-)
|
|
|
e76f14 |
|
|
|
e76f14 |
diff --git a/src/launch-direct.c b/src/launch-direct.c
|
|
|
e76f14 |
index 92b45fd..1081445 100644
|
|
|
e76f14 |
--- a/src/launch-direct.c
|
|
|
e76f14 |
+++ b/src/launch-direct.c
|
|
|
e76f14 |
@@ -591,7 +591,8 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
|
|
|
e76f14 |
ADD_CMDLINE ("-serial");
|
|
|
e76f14 |
ADD_CMDLINE ("stdio");
|
|
|
e76f14 |
|
|
|
e76f14 |
- if (qemu_supports_device (g, data, "Serial Graphics Adapter")) {
|
|
|
e76f14 |
+ if (g->verbose &&
|
|
|
e76f14 |
+ qemu_supports_device (g, data, "Serial Graphics Adapter")) {
|
|
|
e76f14 |
/* Use sgabios instead of vgabios. This means we'll see BIOS
|
|
|
e76f14 |
* messages on the serial port, and also works around this bug
|
|
|
e76f14 |
* in qemu 1.1.0:
|
|
|
e76f14 |
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
|
|
|
e76f14 |
index 3df1833..f9edac0 100644
|
|
|
e76f14 |
--- a/src/launch-libvirt.c
|
|
|
e76f14 |
+++ b/src/launch-libvirt.c
|
|
|
e76f14 |
@@ -1219,9 +1219,11 @@ construct_libvirt_xml_boot (guestfs_h *g,
|
|
|
e76f14 |
} end_element ();
|
|
|
e76f14 |
|
|
|
e76f14 |
#if defined(__i386__) || defined(__x86_64__)
|
|
|
e76f14 |
- start_element ("bios") {
|
|
|
e76f14 |
- attribute ("useserial", "yes");
|
|
|
e76f14 |
- } end_element ();
|
|
|
e76f14 |
+ if (g->verbose) {
|
|
|
e76f14 |
+ start_element ("bios") {
|
|
|
e76f14 |
+ attribute ("useserial", "yes");
|
|
|
e76f14 |
+ } end_element ();
|
|
|
e76f14 |
+ }
|
|
|
e76f14 |
#endif
|
|
|
e76f14 |
|
|
|
e76f14 |
} end_element ();
|
|
|
e76f14 |
--
|
|
|
e76f14 |
1.8.3.1
|
|
|
e76f14 |
|