From patchwork Mon Aug 31 12:23:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 32626 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 2CBA5B70B0 for ; Mon, 31 Aug 2009 22:26:22 +1000 (EST) Received: from localhost ([127.0.0.1]:50516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi5xg-0005rt-B6 for incoming@patchwork.ozlabs.org; Mon, 31 Aug 2009 08:26:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mi5vl-0005Dr-Lj for qemu-devel@nongnu.org; Mon, 31 Aug 2009 08:24:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mi5vg-0005B6-Kn for qemu-devel@nongnu.org; Mon, 31 Aug 2009 08:24:16 -0400 Received: from [199.232.76.173] (port=46677 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi5vg-0005Ap-6p for qemu-devel@nongnu.org; Mon, 31 Aug 2009 08:24:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62479) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mi5vf-0001gb-Ny for qemu-devel@nongnu.org; Mon, 31 Aug 2009 08:24:12 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7VCOABB026399 for ; Mon, 31 Aug 2009 08:24:11 -0400 Received: from zweiblum.home.kraxel.org (vpn2-8-244.ams2.redhat.com [10.36.8.244]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n7VCO8U7020934; Mon, 31 Aug 2009 08:24:09 -0400 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id 1640C700D7; Mon, 31 Aug 2009 14:24:05 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 31 Aug 2009 14:23:58 +0200 Message-Id: <1251721445-17824-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1251721445-17824-1-git-send-email-kraxel@redhat.com> References: <1251721445-17824-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 2/9] qdev: add error message to qdev_device_add(). X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- hw/qdev.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index ff2f096..f9754b1 100644 --- 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);