From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Su69y-0004K3-Bn for qemu-devel@nongnu.org; Wed, 25 Jul 2012 14:18:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Su69x-0002A6-CG for qemu-devel@nongnu.org; Wed, 25 Jul 2012 14:18:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Su69x-00029t-3J for qemu-devel@nongnu.org; Wed, 25 Jul 2012 14:18:09 -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 (8.14.4/8.14.4) with ESMTP id q6PII8PI002317 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Jul 2012 14:18:08 -0400 From: Eduardo Habkost Date: Wed, 25 Jul 2012 15:18:41 -0300 Message-Id: <1343240323-7402-2-git-send-email-ehabkost@redhat.com> In-Reply-To: <1343240323-7402-1-git-send-email-ehabkost@redhat.com> References: <1343240323-7402-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [QEMU PATCH 1/3] vl.c: extract qemu_machine_init() function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: libvir-list@redhat.com, Jiri Denemark , Gleb Natapov Other code directly related to the board init function may be moved there. Signed-off-by: Eduardo Habkost --- hw/boards.h | 7 +++++++ vl.c | 14 +++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/hw/boards.h b/hw/boards.h index 59c01d0..f20f5ab 100644 --- a/hw/boards.h +++ b/hw/boards.h @@ -34,6 +34,13 @@ typedef struct QEMUMachine { int qemu_register_machine(QEMUMachine *m); QEMUMachine *find_default_machine(void); +void qemu_machine_init(QEMUMachine *machine, + ram_addr_t ram_size, + const char *boot_devices, + const char *kernel_filename, + const char *kernel_cmdline, + const char *initrd_filename, + const char *cpu_model); extern QEMUMachine *current_machine; diff --git a/vl.c b/vl.c index 8904db1..34cc145 100644 --- a/vl.c +++ b/vl.c @@ -1209,6 +1209,18 @@ QEMUMachine *find_default_machine(void) return NULL; } +void qemu_machine_init(QEMUMachine *machine, + ram_addr_t ram_size, + const char *boot_devices, + const char *kernel_filename, + const char *kernel_cmdline, + const char *initrd_filename, + const char *cpu_model) +{ + machine->init(ram_size, boot_devices, + kernel_filename, kernel_cmdline, initrd_filename, cpu_model); +} + /***********************************************************/ /* main execution loop */ @@ -3517,7 +3529,7 @@ int main(int argc, char **argv, char **envp) qdev_machine_init(); - machine->init(ram_size, boot_devices, + qemu_machine_init(machine, ram_size, boot_devices, kernel_filename, kernel_cmdline, initrd_filename, cpu_model); cpu_synchronize_all_post_init(); -- 1.7.10.4