fdc: make optional
authorBlue Swirl <blauwirbel@gmail.com>
Sat, 12 Feb 2011 22:25:26 +0000 (22:25 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 20 Feb 2011 09:34:06 +0000 (09:34 +0000)
Ignore failure with fdc device creation.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/fdc.h

index 3b2fb3b248fba960f661271edce1c60c830fc116..09f73c6a9f945dd5450f9c0da9a2eeec070a176a 100644 (file)
--- 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);
     }