From patchwork Wed Mar 16 18:58:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 8603471 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 47C56C0553 for ; Wed, 16 Mar 2016 19:07:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64B802026C for ; Wed, 16 Mar 2016 19:07:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8D64420219 for ; Wed, 16 Mar 2016 19:07:15 +0000 (UTC) Received: from localhost ([::1]:58354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agGmo-0005nL-UT for patchwork-qemu-devel@patchwork.kernel.org; Wed, 16 Mar 2016 15:07:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agGeJ-0000i9-SY for qemu-devel@nongnu.org; Wed, 16 Mar 2016 14:58:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agGeI-0007BF-ON for qemu-devel@nongnu.org; Wed, 16 Mar 2016 14:58:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agGeI-0007B6-I2 for qemu-devel@nongnu.org; Wed, 16 Mar 2016 14:58:26 -0400 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 (Postfix) with ESMTPS id 219FB63173; Wed, 16 Mar 2016 18:58:26 +0000 (UTC) Received: from localhost (vpn1-4-171.gru2.redhat.com [10.97.4.171]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2GIwPXl004128; Wed, 16 Mar 2016 14:58:25 -0400 From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Wed, 16 Mar 2016 15:58:14 -0300 Message-Id: <1458154694-20567-3-git-send-email-ehabkost@redhat.com> In-Reply-To: <1458154694-20567-1-git-send-email-ehabkost@redhat.com> References: <1458154694-20567-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 16 Mar 2016 18:58:26 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Cc: Marcel Apfelbaum , Peter Maydell , Igor Mammedov , Gerd Hoffmann , "Michael S. Tsirkin" Subject: [Qemu-devel] [PULL 2/2] module: Rename machine_init() to opts_init() 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The only remaining users of machine_init() only call qemu_add_opts(). Rename machine_init() to opts_init() and move it closer to the qemu_add_opts() calls on vl.c. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Gerd Hoffmann Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Eduardo Habkost --- fsdev/qemu-fsdev-opts.c | 2 +- hw/acpi/core.c | 2 +- hw/smbios/smbios.c | 2 +- include/qemu/module.h | 4 ++-- ui/input-linux.c | 2 +- ui/spice-core.c | 2 +- ui/vnc.c | 2 +- vl.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fsdev/qemu-fsdev-opts.c b/fsdev/qemu-fsdev-opts.c index 0b4619f..88a4ac3 100644 --- a/fsdev/qemu-fsdev-opts.c +++ b/fsdev/qemu-fsdev-opts.c @@ -83,4 +83,4 @@ static void fsdev_register_config(void) qemu_add_opts(&qemu_fsdev_opts); qemu_add_opts(&qemu_virtfs_opts); } -machine_init(fsdev_register_config); +opts_init(fsdev_register_config); diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 3d9e5c4..31ead64 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -67,7 +67,7 @@ static void acpi_register_config(void) qemu_add_opts(&qemu_acpi_opts); } -machine_init(acpi_register_config); +opts_init(acpi_register_config); static int acpi_checksum(const uint8_t *data, int len) { diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 3b5f9bd..1362e79 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -320,7 +320,7 @@ static void smbios_register_config(void) qemu_add_opts(&qemu_smbios_opts); } -machine_init(smbios_register_config); +opts_init(smbios_register_config); static void smbios_validate_table(void) { diff --git a/include/qemu/module.h b/include/qemu/module.h index 85fafa2..2370708 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -41,14 +41,14 @@ static void __attribute__((constructor)) do_qemu_init_ ## function(void) \ typedef enum { MODULE_INIT_BLOCK, - MODULE_INIT_MACHINE, + MODULE_INIT_OPTS, MODULE_INIT_QAPI, MODULE_INIT_QOM, MODULE_INIT_MAX } module_init_type; #define block_init(function) module_init(function, MODULE_INIT_BLOCK) -#define machine_init(function) module_init(function, MODULE_INIT_MACHINE) +#define opts_init(function) module_init(function, MODULE_INIT_OPTS) #define qapi_init(function) module_init(function, MODULE_INIT_QAPI) #define type_init(function) module_init(function, MODULE_INIT_QOM) diff --git a/ui/input-linux.c b/ui/input-linux.c index 0bc0405..2cf5d49 100644 --- a/ui/input-linux.c +++ b/ui/input-linux.c @@ -388,4 +388,4 @@ static void input_linux_register_config(void) { qemu_add_opts(&qemu_input_linux_opts); } -machine_init(input_linux_register_config); +opts_init(input_linux_register_config); diff --git a/ui/spice-core.c b/ui/spice-core.c index a68a665..e117925 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -945,4 +945,4 @@ static void spice_register_config(void) { qemu_add_opts(&qemu_spice_opts); } -machine_init(spice_register_config); +opts_init(spice_register_config); diff --git a/ui/vnc.c b/ui/vnc.c index 729f630..9494a19 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3875,4 +3875,4 @@ static void vnc_register_config(void) { qemu_add_opts(&qemu_vnc_opts); } -machine_init(vnc_register_config); +opts_init(vnc_register_config); diff --git a/vl.c b/vl.c index 7a28982..40ed4d0 100644 --- a/vl.c +++ b/vl.c @@ -3021,6 +3021,7 @@ int main(int argc, char **argv, char **envp) qemu_add_opts(&qemu_icount_opts); qemu_add_opts(&qemu_semihosting_config_opts); qemu_add_opts(&qemu_fw_cfg_opts); + module_call_init(MODULE_INIT_OPTS); runstate_init(); @@ -3033,7 +3034,6 @@ int main(int argc, char **argv, char **envp) QLIST_INIT (&vm_change_state_head); os_setup_early_signal_handling(); - module_call_init(MODULE_INIT_MACHINE); cpu_model = NULL; snapshot = 0; cyls = heads = secs = 0;