From patchwork Tue Feb 5 20:39:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 218354 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E401B2C0294 for ; Wed, 6 Feb 2013 08:21:06 +1100 (EST) Received: from localhost ([::1]:42589 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2pwu-000624-UY for incoming@patchwork.ozlabs.org; Tue, 05 Feb 2013 16:21:04 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2pwk-00061E-2Y for qemu-devel@nongnu.org; Tue, 05 Feb 2013 16:20:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2pHC-000199-TL for qemu-devel@nongnu.org; Tue, 05 Feb 2013 15:38:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2pHC-00018l-IA for qemu-devel@nongnu.org; Tue, 05 Feb 2013 15:37:58 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r15Kbs4i030340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Feb 2013 15:37:54 -0500 Received: from lacos-laptop.usersys.redhat.com (vpn1-5-180.ams2.redhat.com [10.36.5.180]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r15KbRvg020516; Tue, 5 Feb 2013 15:37:52 -0500 From: Laszlo Ersek To: aliguori@us.ibm.com, pbonzini@redhat.com, afaerber@suse.de, lcapitulino@redhat.com, stefanha@linux.vnet.ibm.com, xiawenc@linux.vnet.ibm.com, kwolf@redhat.com, ehabkost@redhat.com, jasowang@redhat.com, qemu-devel@nongnu.org Date: Tue, 5 Feb 2013 21:39:22 +0100 Message-Id: <1360096768-8863-10-git-send-email-lersek@redhat.com> In-Reply-To: <1360096768-8863-1-git-send-email-lersek@redhat.com> References: <1360096768-8863-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 09/15] qbus_find_recursive(): extend signature with Error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Laszlo Ersek --- hw/qdev-monitor.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) 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);