From patchwork Fri Nov 30 19:27:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 203033 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 45DA52C0097 for ; Sat, 1 Dec 2012 06:55:23 +1100 (EST) Received: from localhost ([::1]:43846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeWEn-0000BH-FS for incoming@patchwork.ozlabs.org; Fri, 30 Nov 2012 14:27:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeWDn-0006D9-Vg for qemu-devel@nongnu.org; Fri, 30 Nov 2012 14:26:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TeWDk-0004Hw-I7 for qemu-devel@nongnu.org; Fri, 30 Nov 2012 14:25:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeWDj-0004HE-W2 for qemu-devel@nongnu.org; Fri, 30 Nov 2012 14:25:56 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAUJPrQU031741 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 30 Nov 2012 14:25:53 -0500 Received: from blackpad.lan.raisama.net (vpn1-5-169.gru2.redhat.com [10.97.5.169]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAUJPrd2021356; Fri, 30 Nov 2012 14:25:53 -0500 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id 6925520342A; Fri, 30 Nov 2012 17:27:26 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Fri, 30 Nov 2012 17:27:19 -0200 Message-Id: <1354303642-4283-8-git-send-email-ehabkost@redhat.com> In-Reply-To: <1354303642-4283-1-git-send-email-ehabkost@redhat.com> References: <1354303642-4283-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori Subject: [Qemu-devel] [RFC 07/10] qdev: add 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 This version 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 requires 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 5557079..a59885f 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -6,4 +6,5 @@ stub-obj-y += fdset-remove-fd.o stub-obj-y += get-fd.o stub-obj-y += set-fd-handler.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; +}