[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/12] vl.c: check for qxl availability
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 02/12] vl.c: check for qxl availability |
Date: |
Sat, 08 Sep 2012 14:40:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0 |
Am 08.09.2012 13:26, schrieb Aurelien Jarno:
> 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 7c577fa..6363915 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1703,6 +1703,11 @@ static bool vmware_vga_available(void)
> return qdev_exists("vmware-svga");
> }
>
> +static bool qxl_vga_available(void)
> +{
> + return qdev_exists("qxl-vga");
I'd suggest to use the QOM equivalent:
object_class_by_name("qxl-vga")
Andreas
> +}
> +
> static void select_vgahw (const char *p)
> {
> const char *opts;
> @@ -1732,7 +1737,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);
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 02/12] vl.c: check for qxl availability, Aurelien Jarno, 2012/09/08
- Re: [Qemu-devel] [PATCH 02/12] vl.c: check for qxl availability,
Andreas Färber <=
- [Qemu-devel] [PATCH 09/12] ppc/pSeries: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 03/12] pci: add a pci_vga_init() function, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 08/12] ppc/prep: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 11/12] pc: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 06/12] ppc/newworld: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 01/12] vga: rename pci_vga_init() into pci_std_vga_init(), Aurelien Jarno, 2012/09/08