qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: libvir-list@redhat.com, Jiri Denemark <jdenemar@redhat.com>,
	Gleb Natapov <gleb@redhat.com>
Subject: [Qemu-devel] [QEMU PATCH 1/3] vl.c: extract qemu_machine_init() function
Date: Wed, 25 Jul 2012 15:18:41 -0300	[thread overview]
Message-ID: <1343240323-7402-2-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1343240323-7402-1-git-send-email-ehabkost@redhat.com>

Other code directly related to the board init function may be moved
there.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 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

  reply	other threads:[~2012-07-25 18:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-25 18:18 [Qemu-devel] [QEMU PATCH 0/3] versioned CPU models / per-machine-type aliases Eduardo Habkost
2012-07-25 18:18 ` Eduardo Habkost [this message]
2012-07-25 22:18   ` [Qemu-devel] [libvirt] [QEMU PATCH 1/3] vl.c: extract qemu_machine_init() function Eric Blake
2012-07-30 16:19     ` Eduardo Habkost
2012-07-25 18:18 ` [Qemu-devel] [QEMU PATCH 2/3] per-machine-type CPU model alias system Eduardo Habkost
2012-07-25 22:46   ` Andreas Färber
2012-07-25 18:18 ` [Qemu-devel] [QEMU PATCH 3/3] x86: pc: versioned CPU model names & compatibility aliases Eduardo Habkost
2012-07-25 22:52   ` Andreas Färber
2012-07-26 14:24     ` Eduardo Habkost
2012-07-26 14:31       ` Andreas Färber
2012-07-26 14:48         ` Eduardo Habkost
2012-07-31 13:22           ` Igor Mammedov
2012-07-31 13:44             ` Eduardo Habkost
2012-07-26 14:33   ` Jiri Denemark
2012-07-26 14:54     ` Eduardo Habkost
2012-07-25 23:43 ` [Qemu-devel] [QEMU PATCH 0/3] versioned CPU models / per-machine-type aliases Anthony Liguori
2012-07-26 13:53   ` Eduardo Habkost
2012-07-26 14:06     ` Andreas Färber
2012-07-26 14:29       ` Eduardo Habkost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343240323-7402-2-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=gleb@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).