From patchwork Tue Jan 6 13:29:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Apfelbaum X-Patchwork-Id: 425655 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7FC711400B7 for ; Wed, 7 Jan 2015 00:31:35 +1100 (AEDT) Received: from localhost ([::1]:36450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8UEP-0005ir-Fy for incoming@patchwork.ozlabs.org; Tue, 06 Jan 2015 08:31:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8UCS-00025L-2L for qemu-devel@nongnu.org; Tue, 06 Jan 2015 08:29:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8UCQ-0002Lq-Tv for qemu-devel@nongnu.org; Tue, 06 Jan 2015 08:29:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8UCQ-0002KG-N1 for qemu-devel@nongnu.org; Tue, 06 Jan 2015 08:29:30 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t06DTRf6002081 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Jan 2015 08:29:27 -0500 Received: from work.tlv.redhat.com (dhcp-4-230.tlv.redhat.com [10.35.4.230]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t06DTHmo022684; Tue, 6 Jan 2015 08:29:24 -0500 From: Marcel Apfelbaum To: qemu-devel@nongnu.org Date: Tue, 6 Jan 2015 15:29:13 +0200 Message-Id: <1420550957-22337-3-git-send-email-marcel@redhat.com> In-Reply-To: <1420550957-22337-1-git-send-email-marcel@redhat.com> References: <1420550957-22337-1-git-send-email-marcel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, mst@redhat.com, lersek@redhat.com, agraf@suse.de, stefanha@redhat.com, pbonzini@redhat.com, afaerber@suse.de, rth@twiddle.net Subject: [Qemu-devel] [PATCH 2/6] hw/machine: added machine_usb wrapper 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 Following QOM convention, object properties should not be accessed directly. Signed-off-by: Marcel Apfelbaum --- hw/core/machine.c | 5 +++++ include/hw/boards.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/hw/core/machine.c b/hw/core/machine.c index a0ae5f9..fbd91be 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -398,6 +398,11 @@ static void machine_finalize(Object *obj) g_free(ms->firmware); } +bool machine_usb(MachineState *machine) +{ + return machine->usb; +} + static const TypeInfo machine_info = { .name = TYPE_MACHINE, .parent = TYPE_OBJECT, diff --git a/include/hw/boards.h b/include/hw/boards.h index e0a6790..3ddc449 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -65,6 +65,8 @@ int qemu_register_machine(QEMUMachine *m); MachineClass *find_default_machine(void); extern MachineState *current_machine; +bool machine_usb(MachineState *machine); + /** * MachineClass: * @qemu_machine: #QEMUMachine