From patchwork Tue Dec 4 13:19:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 203644 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 31E622C0090 for ; Wed, 5 Dec 2012 00:57:47 +1100 (EST) Received: from localhost ([::1]:41268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfsOz-0000IQ-Vi for incoming@patchwork.ozlabs.org; Tue, 04 Dec 2012 08:19:09 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfsOC-0007bk-69 for qemu-devel@nongnu.org; Tue, 04 Dec 2012 08:18:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfsO3-0000Jc-Tq for qemu-devel@nongnu.org; Tue, 04 Dec 2012 08:18:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfsO3-0000In-Ku for qemu-devel@nongnu.org; Tue, 04 Dec 2012 08:18:11 -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 qB4DI9xT023542 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 Dec 2012 08:18:09 -0500 Received: from blackpad.lan.raisama.net (vpn1-5-217.gru2.redhat.com [10.97.5.217]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qB4DI8uY030190; Tue, 4 Dec 2012 08:18:09 -0500 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id 2AE7B20184E; Tue, 4 Dec 2012 11:19:44 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Tue, 4 Dec 2012 11:19:35 -0200 Message-Id: <1354627180-25704-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1354627180-25704-1-git-send-email-ehabkost@redhat.com> References: <1354627180-25704-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 , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori , Paolo Bonzini Subject: [Qemu-devel] [RFC 3/8] libqemustub: add qemu_[un]register_reset() stubs 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 will be useful for code that don't call qemu_devices_reset() (e.g. *-user). If qemu_devices_reset() is never called, it means we don't need to keep track of the reset handler list. Signed-off-by: Eduardo Habkost --- stubs/Makefile.objs | 1 + stubs/reset.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 stubs/reset.c diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index 035b29a..00f0b64 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -5,4 +5,5 @@ stub-obj-y += fdset-get-fd.o stub-obj-y += fdset-remove-fd.o stub-obj-y += get-fd.o stub-obj-y += set-fd-handler.o +stub-obj-y += reset.o stub-obj-$(CONFIG_WIN32) += fd-register.o diff --git a/stubs/reset.c b/stubs/reset.c new file mode 100644 index 0000000..ad28725 --- /dev/null +++ b/stubs/reset.c @@ -0,0 +1,13 @@ +#include "hw/hw.h" + +/* Stub functions for binaries that never call qemu_devices_reset(), + * and don't need to keep track of the reset handler list. + */ + +void qemu_register_reset(QEMUResetHandler *func, void *opaque) +{ +} + +void qemu_unregister_reset(QEMUResetHandler *func, void *opaque) +{ +}