summaryrefslogtreecommitdiffstats
path: root/hw/vmware_vga.h
diff options
context:
space:
mode:
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 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
OpenPOWER on IntegriCloud