summaryrefslogtreecommitdiff
path: root/hw/vmware_vga.h
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-02-05 14:34:37 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-02-12 08:28:22 +0000
commit7ba7e49e6a7493e1cd0fe07cc67403846d642fc5 (patch)
tree56175042ccf012b1dd1caa71f95ad7ab49ee3d17 /hw/vmware_vga.h
parent7cc050b1659545d0c87108c17f0bf78561efcf9a (diff)
downloadqemu-7ba7e49e6a7493e1cd0fe07cc67403846d642fc5.tar.gz
qemu-7ba7e49e6a7493e1cd0fe07cc67403846d642fc5.tar.bz2
qemu-7ba7e49e6a7493e1cd0fe07cc67403846d642fc5.zip
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.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/vmware_vga.h b/hw/vmware_vga.h
index e7bcb22146..5132573a56 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