Received: from [140.186.70.92] (port=60629 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkJmn-0000i8-DM for qemu-devel@nongnu.org; Tue, 01 Feb 2011 12:13:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkJTu-000069-9w for qemu-devel@nongnu.org; Tue, 01 Feb 2011 11:53:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkJTt-0008Vm-Vf for qemu-devel@nongnu.org; Tue, 01 Feb 2011 11:53:30 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p11GrP8x022140 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 1 Feb 2011 11:53:25 -0500 From: Eduardo Habkost Date: Tue, 1 Feb 2011 14:53:21 -0200 Message-Id: <1296579203-21083-3-git-send-email-ehabkost@redhat.com> In-Reply-To: <1296579203-21083-1-git-send-email-ehabkost@redhat.com> References: <1296579203-21083-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 2/4] skip pci_vmsvga_init() calls if CONFIG_VMWARE_VGA is disabled List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Juan Quintela 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 --- 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