aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-08-14 13:11:49 +0200
committerAlexander Graf <agraf@suse.de>2012-08-15 19:43:15 +0200
commit8c57b867b5d18b0d916797dfbac465b8aaa5bf5a (patch)
treea7ea1be9a2cef6ec7c825a91532ada44bd72df99
parenta5b71725c7067f6805eb30ff8e03dce3b6bf7a53 (diff)
PPC: spapr: Rework VGA select logic
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>
-rw-r--r--hw/spapr.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/hw/spapr.c b/hw/spapr.c
index 494c412db..709673e76 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -563,16 +563,21 @@ 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;
+ 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 */