Patchwork [v2,09/15] qbus_find_recursive(): extend signature with Error

login
register
mail settings
Submitter Laszlo Ersek
Date Feb. 5, 2013, 8:39 p.m.
Message ID <1360096768-8863-10-git-send-email-lersek@redhat.com>
Download mbox | patch
Permalink /patch/218354/
State New
Headers show

Comments

Laszlo Ersek - Feb. 5, 2013, 8:39 p.m.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 hw/qdev-monitor.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

Patch

diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
index 64359ee..0a0bced 100644
--- a/hw/qdev-monitor.c
+++ b/hw/qdev-monitor.c
@@ -289,7 +289,7 @@  static DeviceState *qbus_find_dev(BusState *bus, char *elem)
 }
 
 static BusState *qbus_find_recursive(BusState *bus, const char *name,
-                                     const char *type)
+                                     const char *type, Error **errp)
 {
     BusChild *kid;
 
@@ -317,7 +317,7 @@  static BusState *qbus_find_recursive(BusState *bus, const char *name,
         QLIST_FOREACH(child, &dev->child_bus, sibling) {
             BusState *ret;
 
-            ret = qbus_find_recursive(child, name, type);
+            ret = qbus_find_recursive(child, name, type, NULL);
             if (ret) {
                 return ret;
             }
@@ -342,7 +342,7 @@  static BusState *qbus_find(const char *path)
             assert(!path[0]);
             elem[0] = len = 0;
         }
-        bus = qbus_find_recursive(sysbus_get_default(), elem, NULL);
+        bus = qbus_find_recursive(sysbus_get_default(), elem, NULL, NULL);
         if (!bus) {
             qerror_report(QERR_BUS_NOT_FOUND, elem);
             return NULL;
@@ -459,7 +459,8 @@  DeviceState *qdev_device_add(QemuOpts *opts)
             return NULL;
         }
     } else {
-        bus = qbus_find_recursive(sysbus_get_default(), NULL, k->bus_type);
+        bus = qbus_find_recursive(sysbus_get_default(), NULL, k->bus_type,
+                                  NULL);
         if (!bus) {
             qerror_report(QERR_NO_BUS_FOR_DEVICE,
                           k->bus_type, driver);