From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCqub-0007GV-Sb for qemu-devel@nongnu.org; Sun, 09 Oct 2011 06:47:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCquW-0008AF-TK for qemu-devel@nongnu.org; Sun, 09 Oct 2011 06:47:17 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:58498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCquW-0008A1-ET for qemu-devel@nongnu.org; Sun, 09 Oct 2011 06:47:12 -0400 Message-ID: <4E917BAE.6020804@web.de> Date: Sun, 09 Oct 2011 12:47:10 +0200 From: Jan Kiszka MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC8F19CEDD63C2E8A03ADA34A" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH 1/3] vga: make PCI devices optional List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC8F19CEDD63C2E8A03ADA34A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-10-09 12:22, Blue Swirl wrote: > Signed-off-by: Blue Swirl > --- > 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(-) >=20 > 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; > } >=20 > -void pci_cirrus_vga_init(PCIBus *bus) > -{ > - pci_create_simple(bus, -1, "cirrus-vga"); > -} > - > static PCIDeviceInfo cirrus_vga_info =3D { > .qdev.name =3D "cirrus-vga", > .qdev.desc =3D "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 --------------enigC8F19CEDD63C2E8A03ADA34A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6Re64ACgkQitSsb3rl5xRhMgCg0V3H+w2hZZsktoYSYMmg3iX/ DSAAoNO9ej3WFS+dPGLULa4anm6rCbNc =0med -----END PGP SIGNATURE----- --------------enigC8F19CEDD63C2E8A03ADA34A--