qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 02/12] vl.c: check for qxl availability
Date: Sat, 08 Sep 2012 14:40:46 +0200	[thread overview]
Message-ID: <504B3CCE.8060301@suse.de> (raw)
In-Reply-To: <1347103584-20598-3-git-send-email-aurelien@aurel32.net>

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 <aliguori@us.ibm.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  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

  reply	other threads:[~2012-09-08 12:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 01/12] vga: rename pci_vga_init() into pci_std_vga_init() Aurelien Jarno
2012-09-08 12:33   ` Blue Swirl
2012-09-08 12:35   ` Andreas Färber
2012-09-08 11:26 ` [Qemu-devel] [PATCH 02/12] vl.c: check for qxl availability Aurelien Jarno
2012-09-08 12:40   ` Andreas Färber [this message]
2012-09-08 11:26 ` [Qemu-devel] [PATCH 03/12] pci: add a pci_vga_init() function Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 04/12] mips/malta: use the new " Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 05/12] alpha: " Aurelien Jarno
2012-09-08 14:47   ` Alexander Graf
2012-09-08 14:57     ` Aurelien Jarno
2012-09-08 15:00       ` Alexander Graf
2012-09-08 15:04         ` Alexander Graf
2012-09-10 15:56   ` Richard Henderson
2012-09-08 11:26 ` [Qemu-devel] [PATCH 06/12] ppc/newworld: " Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 07/12] ppc/oldworld: " Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 08/12] ppc/prep: " Aurelien Jarno
2012-09-08 12:50   ` Andreas Färber
2012-09-08 11:26 ` [Qemu-devel] [PATCH 09/12] ppc/pSeries: " Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 10/12] sun/sun4u: " Aurelien Jarno
2012-09-08 12:32   ` Blue Swirl
2012-09-08 11:26 ` [Qemu-devel] [PATCH 11/12] pc: " Aurelien Jarno
2012-09-08 12:35   ` Blue Swirl
2012-09-08 11:26 ` [Qemu-devel] [PATCH 12/12] vga: cleanup after pci_vga_init() conversion Aurelien Jarno
2012-09-08 14:53 ` [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Alexander Graf

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=504B3CCE.8060301@suse.de \
    --to=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=aurelien@aurel32.net \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).