qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel.a@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, famz@redhat.com, stefanha@redhat.com,
	stefano.stabellini@eu.citrix.com, alex@alex.org.uk,
	armbru@redhat.com, mst@redhat.com, agraf@suse.de,
	lcapitulino@redhat.com, aliguori@amazon.com,
	anthony.perard@citrix.com, pbonzini@redhat.com, afaerber@suse.de,
	rth@twiddle.net
Subject: [Qemu-devel] [PATCH V3 3/5] vl.c: Replace QEMUMachine with MachineClass in QEMUMachineInitArgs
Date: Wed,  9 Apr 2014 20:34:51 +0300	[thread overview]
Message-ID: <1397064893-11526-4-git-send-email-marcel.a@redhat.com> (raw)
In-Reply-To: <1397064893-11526-1-git-send-email-marcel.a@redhat.com>

QEMUMachine's fields are already in MachineClass. We can safely
make the switch because we copy them in machine_class_init.

Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
---
 include/hw/boards.h | 5 +++--
 vl.c                | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/hw/boards.h b/include/hw/boards.h
index 138346d..51211a6 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -7,8 +7,10 @@
 #include "hw/qdev.h"
 #include "qom/object.h"
 
+typedef struct MachineClass MachineClass;
+
 typedef struct QEMUMachineInitArgs {
-    const QEMUMachine *machine;
+    const MachineClass *machine;
     ram_addr_t ram_size;
     const char *boot_order;
     const char *kernel_filename;
@@ -62,7 +64,6 @@ int qemu_register_machine(QEMUMachine *m);
     OBJECT_CLASS_CHECK(MachineClass, (klass), TYPE_MACHINE)
 
 typedef struct MachineState MachineState;
-typedef struct MachineClass MachineClass;
 
 MachineClass *find_default_machine(void);
 extern MachineState *current_machine;
diff --git a/vl.c b/vl.c
index 0b0202d..dc8d515 100644
--- a/vl.c
+++ b/vl.c
@@ -4394,7 +4394,7 @@ int main(int argc, char **argv, char **envp)
 
     qdev_machine_init();
 
-    QEMUMachineInitArgs args = { .machine = machine,
+    QEMUMachineInitArgs args = { .machine = machine_class,
                                  .ram_size = ram_size,
                                  .boot_order = boot_order,
                                  .kernel_filename = kernel_filename,
-- 
1.8.3.1

  parent reply	other threads:[~2014-04-09 17:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09 17:34 [Qemu-devel] [PATCH V3 0/5] remove QEMUMachine indirection from MachineClass Marcel Apfelbaum
2014-04-09 17:34 ` [Qemu-devel] [PATCH V3 1/5] hw/boards.h: remove obsoleted field from QEMUMachine Marcel Apfelbaum
2014-04-09 17:34 ` [Qemu-devel] [PATCH V3 2/5] vl.c: copy QEMUMachine's fields to MachineClass Marcel Apfelbaum
2014-04-09 17:34 ` Marcel Apfelbaum [this message]
2014-04-09 17:34 ` [Qemu-devel] [PATCH V3 4/5] machine: replace QEMUMachine by MachineClass in accelerator configuration Marcel Apfelbaum
2014-04-09 17:34 ` [Qemu-devel] [PATCH V3 5/5] machine: remove QEMUMachine indirection from MachineClass Marcel Apfelbaum

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=1397064893-11526-4-git-send-email-marcel.a@redhat.com \
    --to=marcel.a@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=alex@alex.org.uk \
    --cc=aliguori@amazon.com \
    --cc=anthony.perard@citrix.com \
    --cc=armbru@redhat.com \
    --cc=famz@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    --cc=stefano.stabellini@eu.citrix.com \
    /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).