qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: Juan Quintela <quintela@redhat.com>
Subject: [Qemu-devel] [PATCH 2/4] skip pci_vmsvga_init() calls if CONFIG_VMWARE_VGA is disabled
Date: Tue,  1 Feb 2011 14:53:21 -0200	[thread overview]
Message-ID: <1296579203-21083-3-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1296579203-21083-1-git-send-email-ehabkost@redhat.com>

I was planning to add the check for CONFIG_VMWARE to the command-line
parsing code in vl.c, but vl.c is not built by Makefile.target, so we
can't test for a per-target config option there.

It is not the best solution, but it is better than simply having a
CONFIG_VMWARE_VGA option that doesn't work and can't be disabled. I
don't see a good way to implement it that wouldn't involve heavily
refactoring completely the '-vga' option parsing code.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/mips_malta.c |    4 ++++
 hw/pc.c         |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index 6be8aa7..b4164a0 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -975,7 +975,11 @@ void mips_malta_init (ram_addr_t ram_size,
     if (cirrus_vga_enabled) {
         pci_cirrus_vga_init(pci_bus);
     } else if (vmsvga_enabled) {
+#ifdef CONFIG_VMWARE_VGA
         pci_vmsvga_init(pci_bus);
+#else
+        fprintf(stderr, "%s: vmware_vga support is not compiled in\n", __FUNCTION__);
+#endif /* CONFIG_VMWARE_VGA */
     } else if (std_vga_enabled) {
         pci_vga_init(pci_bus);
     }
diff --git a/hw/pc.c b/hw/pc.c
index 119c110..e872a7b 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -987,10 +987,14 @@ void pc_vga_init(PCIBus *pci_bus)
             isa_cirrus_vga_init();
         }
     } else if (vmsvga_enabled) {
+#ifdef CONFIG_VMWARE_VGA
         if (pci_bus)
             pci_vmsvga_init(pci_bus);
         else
             fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
+#else
+        fprintf(stderr, "%s: vmware_vga support is not compiled in\n", __FUNCTION__);
+#endif /* CONFIG_VMWARE_VGA */
     } else if (std_vga_enabled) {
         if (pci_bus) {
             pci_vga_init(pci_bus);
-- 
1.7.3.2

  parent reply	other threads:[~2011-02-01 17:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01 16:53 [Qemu-devel] [PATCH 0/4] fix/add CONFIG_* options for VMWare device emulation Eduardo Habkost
2011-02-01 16:53 ` [Qemu-devel] [PATCH 1/4] Add config-devices.h again Eduardo Habkost
2011-02-01 18:14   ` Stefan Weil
2011-02-02 18:09     ` Eduardo Habkost
2011-02-04 14:48     ` [Qemu-devel] " Juan Quintela
2011-02-01 16:53 ` Eduardo Habkost [this message]
2011-02-01 16:53 ` [Qemu-devel] [PATCH 3/4] add CONFIG_VMMOUSE option Eduardo Habkost
2011-02-01 16:53 ` [Qemu-devel] [PATCH 4/4] add CONFIG_VMPORT option Eduardo Habkost
2011-02-01 18:10 ` [Qemu-devel] [PATCH 0/4] fix/add CONFIG_* options for VMWare device emulation Blue Swirl
2011-02-02  3:01   ` [Qemu-devel] " Juan Quintela
2011-02-02  5:07     ` David Ahern
2011-02-02  7:55   ` Paolo Bonzini
2011-02-02 17:16     ` Blue Swirl
2011-02-02 17:37       ` Eduardo Habkost
2011-02-02 18:30         ` Blue Swirl

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=1296579203-21083-3-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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).