From: Alexander Graf <agraf@suse.de>
To: qemu-devel qemu-devel <qemu-devel@nongnu.org>
Cc: qemu-ppc@nongnu.org, zhlcindy@gmail.com
Subject: [Qemu-devel] [PATCH] PPC: spapr: Rework VGA select logic
Date: Tue, 14 Aug 2012 13:15:12 +0200 [thread overview]
Message-ID: <1344942912-30639-1-git-send-email-agraf@suse.de> (raw)
When selecting our VGA adapter, we want to:
* fail completely when we can't satisfy the user's request
* support -nographic where no VGA adapter should be spawned
This patch reworks the logic so we fulfill the two conditions above.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
hw/spapr.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/hw/spapr.c b/hw/spapr.c
index 494c412..31c4e53 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -563,16 +563,22 @@ static void spapr_cpu_reset(void *opaque)
cpu_reset(CPU(cpu));
}
+/* Returns whether we want to use VGA or not */
static int spapr_vga_init(PCIBus *pci_bus)
{
- if (std_vga_enabled) {
+ switch (vga_interface_type) {
+ case VGA_STD:
pci_vga_init(pci_bus);
- } else {
+ return 1;
+ break;
+ case VGA_NONE:
+ return 0;
+ default:
fprintf(stderr, "This vga model is not supported,"
"currently it only supports -vga std\n");
- return 0;
+ exit(0);
+ break;
}
- return 1;
}
/* pSeries LPAR / sPAPR hardware init */
--
1.6.0.2
reply other threads:[~2012-08-14 11:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344942912-30639-1-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=zhlcindy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).