diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-02-05 14:34:37 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-02-12 08:28:22 +0000 |
commit | 7ba7e49e6a7493e1cd0fe07cc67403846d642fc5 (patch) | |
tree | 56175042ccf012b1dd1caa71f95ad7ab49ee3d17 /hw/vmware_vga.h | |
parent | 7cc050b1659545d0c87108c17f0bf78561efcf9a (diff) | |
download | hqemu-7ba7e49e6a7493e1cd0fe07cc67403846d642fc5.zip hqemu-7ba7e49e6a7493e1cd0fe07cc67403846d642fc5.tar.gz |
x86,MIPS: make vmware_vga optional
Allow failure with vmware_vga device creation and use standard
VGA instead.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/vmware_vga.h')
-rw-r--r-- | hw/vmware_vga.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/vmware_vga.h b/hw/vmware_vga.h index e7bcb22..5132573 100644 --- a/hw/vmware_vga.h +++ b/hw/vmware_vga.h @@ -4,9 +4,16 @@ #include "qemu-common.h" /* vmware_vga.c */ -static inline void pci_vmsvga_init(PCIBus *bus) +static inline bool pci_vmsvga_init(PCIBus *bus) { - pci_create_simple(bus, -1, "vmware-svga"); + PCIDevice *dev; + + dev = pci_try_create(bus, -1, "vmware-svga"); + if (!dev || qdev_init(&dev->qdev) < 0) { + return false; + } else { + return true; + } } #endif |