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 10/10] fdc: make optional
Date: Sun, 13 Feb 2011 00:44:39 +0200	[thread overview]
Message-ID: <AANLkTi=ULhszDymdzziAVe7T9LEjX4mmLf95YLGqGeao@mail.gmail.com> (raw)

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

Ignore failure with fdc device creation.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 hw/fdc.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/hw/fdc.h b/hw/fdc.h
index 3b2fb3b..09f73c6 100644
--- a/hw/fdc.h
+++ b/hw/fdc.h
@@ -11,7 +11,10 @@ static inline void fdctrl_init_isa(DriveInfo **fds)
 {
     ISADevice *dev;

-    dev = isa_create("isa-fdc");
+    dev = isa_try_create("isa-fdc");
+    if (!dev) {
+        return;
+    }
     if (fds[0]) {
         qdev_prop_set_drive_nofail(&dev->qdev, "driveA", fds[0]->bdrv);
     }
-- 
1.6.2.4

[-- Attachment #2: 0010-fdc-make-optional.patch --]
[-- Type: application/mbox, Size: 1050 bytes --]

                 reply	other threads:[~2011-02-12 22:45 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='AANLkTi=ULhszDymdzziAVe7T9LEjX4mmLf95YLGqGeao@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).