qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH 3/4] vga-isa: make optional
Date: Sun, 13 Feb 2011 23:10:16 +0200	[thread overview]
Message-ID: <AANLkTinkqsBgBYmAEQyfNTU-frAxA+uYy2AVmth+snvx@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 722 bytes --]

Ignore failure with vga-isa device creation, but print a warning
message.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 hw/pc.h |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/hw/pc.h b/hw/pc.h
index 475484a..60f8c42 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -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);
-- 
1.6.2.4

[-- Attachment #2: 0003-vga-isa-make-optional.patch --]
[-- Type: application/mbox, Size: 1194 bytes --]

                 reply	other threads:[~2011-02-13 21:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTinkqsBgBYmAEQyfNTU-frAxA+uYy2AVmth+snvx@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).