[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 04/17] vl.c: check for qxl availability
From: |
Aurelien Jarno |
Subject: |
[Qemu-devel] [PATCH v3 04/17] vl.c: check for qxl availability |
Date: |
Tue, 11 Sep 2012 21:10:29 +0200 |
Check for qxl availability in vl.c. This will allow to remove #ifdef
CONFIG_SPICE .. #endif later in this series
Cc: Anthony Liguori <address@hidden>
Cc: Gerd Hoffmann <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>
---
vl.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index f7eed7a..ba2fa9f 100644
--- a/vl.c
+++ b/vl.c
@@ -1704,6 +1704,11 @@ static bool vmware_vga_available(void)
return object_class_by_name("vmware-svga");
}
+static bool qxl_vga_available(void)
+{
+ return object_class_by_name("qxl-vga");
+}
+
static void select_vgahw (const char *p)
{
const char *opts;
@@ -1733,7 +1738,12 @@ static void select_vgahw (const char *p)
} else if (strstart(p, "xenfb", &opts)) {
vga_interface_type = VGA_XENFB;
} else if (strstart(p, "qxl", &opts)) {
- vga_interface_type = VGA_QXL;
+ if (qxl_vga_available()) {
+ vga_interface_type = VGA_QXL;
+ } else {
+ fprintf(stderr, "Error: QXL VGA not available\n");
+ exit(0);
+ }
} else if (!strstart(p, "none", &opts)) {
invalid_vga:
fprintf(stderr, "Unknown vga type: %s\n", p);
--
1.7.10.4
- [Qemu-devel] [PATCH v3 11/17] ppc/oldworld: use the new pci_vga_init() function, (continued)
- [Qemu-devel] [PATCH v3 11/17] ppc/oldworld: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 10/17] ppc/newworld: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 09/17] alpha: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 08/17] mips/malta: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 17/17] vga: cleanup after isa_vga_init() and pci_vga_init() conversion, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 01/17] vga: rename pci_vga_init() into pci_std_vga_init(), Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 03/17] vl.c: convert *vga_enabled functions to QOM, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 06/17] pci: add a pci_vga_init() function, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 05/17] vl.c: default to std if cirrus is not available, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 04/17] vl.c: check for qxl availability,
Aurelien Jarno <=
- [Qemu-devel] [PATCH v3 07/17] isa: add a isa_vga_init() function, Aurelien Jarno, 2012/09/11