qdev: add error message to qdev_device_add().
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 31 Aug 2009 12:23:58 +0000 (14:23 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 9 Sep 2009 19:55:17 +0000 (14:55 -0500)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/qdev.c

index ff2f096..f9754b1 100644 (file)
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -186,8 +186,11 @@ DeviceState *qdev_device_add(QemuOpts *opts)
     } else {
         bus = qbus_find_recursive(main_system_bus, NULL, info->bus_info);
     }
-    if (!bus)
+    if (!bus) {
+        qemu_error("Did not find %s bus for %s\n",
+                   path ? path : info->bus_info->name, info->name);
         return NULL;
+    }
 
     /* create device, set properties */
     qdev = qdev_create(bus, driver);