On 2011-10-09 12:22, Blue Swirl wrote: > Signed-off-by: Blue Swirl <blauwir...@gmail.com> > --- > hw/cirrus_vga.c | 5 ----- > hw/pc.c | 6 +++++- > hw/pc.h | 26 ++++++++++++++++++++++++-- > hw/pci.c | 18 ++++++++++++++++++ > hw/pci.h | 4 ++++ > hw/vga-pci.c | 6 ------ > 6 files changed, 51 insertions(+), 14 deletions(-) > > diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c > index c7e365b..a11444c 100644 > --- a/hw/cirrus_vga.c > +++ b/hw/cirrus_vga.c > @@ -2955,11 +2955,6 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev) > return 0; > } > > -void pci_cirrus_vga_init(PCIBus *bus) > -{ > - pci_create_simple(bus, -1, "cirrus-vga"); > -} > - > static PCIDeviceInfo cirrus_vga_info = { > .qdev.name = "cirrus-vga", > .qdev.desc = "Cirrus CLGD 54xx VGA", > diff --git a/hw/pc.c b/hw/pc.c > index 203627d..97f93d4 100644 > --- a/hw/pc.c > +++ b/hw/pc.c > @@ -1068,7 +1068,11 @@ void pc_vga_init(PCIBus *pci_bus) > { > if (cirrus_vga_enabled) { > if (pci_bus) { > - pci_cirrus_vga_init(pci_bus); > + if (!pci_cirrus_vga_init(pci_bus)) { > + fprintf(stderr, "Warning: cirrus_vga not available," > + " using standard VGA instead\n"); > + pci_vga_init(pci_bus); > + }
If you adjust the default vga interface in case cirrus is configured out, you can simply fail here. Would be more user-friendly, specifically if the user actually specified -vga cirrus. Jan
signature.asc
Description: OpenPGP digital signature