Patchwork [10/10] fdc: make optional

login
register
mail settings
Submitter Blue Swirl
Date Feb. 12, 2011, 10:44 p.m.
Message ID <AANLkTi=ULhszDymdzziAVe7T9LEjX4mmLf95YLGqGeao@mail.gmail.com>
Download mbox | patch
Permalink /patch/82954/
State New
Headers show

Comments

Blue Swirl - Feb. 12, 2011, 10:44 p.m.
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(-)

Patch

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);
     }