diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2012-09-08 12:01:06 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2012-10-06 18:48:38 +0200 |
commit | 879049a39724f91224f10c8d80b3cf70c9dc1c5e (patch) | |
tree | 55d8c6a725fe3a6d0d5ed2e38e23b3a70db52ac7 | |
parent | 36b7f27d2195a09dbfb7f08b2323d807c1ad90b0 (diff) | |
download | qemu-879049a39724f91224f10c8d80b3cf70c9dc1c5e.zip qemu-879049a39724f91224f10c8d80b3cf70c9dc1c5e.tar.gz qemu-879049a39724f91224f10c8d80b3cf70c9dc1c5e.tar.bz2 |
vl.c: check for qxl availability
Check for qxl availability in vl.c. This will allow to remove #ifdef
CONFIG_SPICE .. #endif later in this series
Cc: Anthony Liguori <aliguori@us.ibm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r-- | vl.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1714,6 +1714,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; @@ -1743,7 +1748,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); |