diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-02-13 14:17:00 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-02-20 09:34:44 +0000 |
commit | c74b88dffcb2ebfe018e460ac759ae8b1234911d (patch) | |
tree | d168b2b24b788f16cff7838a30332930751c6f39 | |
parent | 7435b791ca9c76b11a9dba4beb60656f951432c1 (diff) |
vga-isa: make optional
Ignore failure with vga-isa device creation, but print a warning
message.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r-- | hw/pc.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -183,9 +183,15 @@ extern enum vga_retrace_method vga_retrace_method; static inline int isa_vga_init(void) { - isa_create_simple("isa-vga"); + ISADevice *dev; - return 0; + dev = isa_try_create("isa-vga"); + if (!dev) { + fprintf(stderr, "Warning: isa-vga not available\n"); + return 0; + } + qdev_init_nofail(&dev->qdev); + return 1; } int pci_vga_init(PCIBus *bus); |