From patchwork Wed Dec 5 16:49:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 203901 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 ED0DA2C009F for ; Thu, 6 Dec 2012 03:48:28 +1100 (EST) Received: from localhost ([::1]:57153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgI95-0006dq-6W for incoming@patchwork.ozlabs.org; Wed, 05 Dec 2012 11:48:27 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgI8l-0006Zu-H5 for qemu-devel@nongnu.org; Wed, 05 Dec 2012 11:48:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TgI8a-000608-85 for qemu-devel@nongnu.org; Wed, 05 Dec 2012 11:48:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgI8a-0005zX-0Q for qemu-devel@nongnu.org; Wed, 05 Dec 2012 11:47:56 -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 qB5GlskD023294 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Dec 2012 11:47:54 -0500 Received: from blackpad.lan.raisama.net (vpn1-5-209.gru2.redhat.com [10.97.5.209]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qB5Glrat020007; Wed, 5 Dec 2012 11:47:54 -0500 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id A3947200DA0; Wed, 5 Dec 2012 14:49:28 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Wed, 5 Dec 2012 14:49:09 -0200 Message-Id: <1354726153-30264-5-git-send-email-ehabkost@redhat.com> In-Reply-To: <1354726153-30264-1-git-send-email-ehabkost@redhat.com> References: <1354726153-30264-1-git-send-email-ehabkost@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 Cc: Igor Mammedov , Don Slutz , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH 4/8] libqemustub: sysbus_get_default() stub 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 The stub will be used on cases where sysbus.c is not compiled in (e.g. *-user). Note that code that uses NULL as the bus with qdev{_try,}_create() implicitly uses sysbus_get_default() as the bus, and will still require sysbus.c to be compiled in. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: - Use the new QEMU_WEAK_ALIAS mechanism, instead of GCC_WEAK Changes v2 -> v3: - Use the new libqemustub.a mechanism, instead of QEMU_WEAK_ALIAS --- stubs/Makefile.objs | 1 + stubs/sysbus.c | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 stubs/sysbus.c diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index ca2197e..7672c69 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -7,4 +7,5 @@ stub-obj-y += get-fd.o stub-obj-y += set-fd-handler.o stub-obj-y += reset.o stub-obj-y += vmstate.o +stub-obj-y += sysbus.o stub-obj-$(CONFIG_WIN32) += fd-register.o diff --git a/stubs/sysbus.c b/stubs/sysbus.c new file mode 100644 index 0000000..e134965 --- /dev/null +++ b/stubs/sysbus.c @@ -0,0 +1,6 @@ +#include "hw/qdev-core.h" + +BusState *sysbus_get_default(void) +{ + return NULL; +}