qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-stable] [Qemu-devel] [PATCH] vl.c: fix regression when reading mac


From: Marcel Apfelbaum
Subject: [Qemu-stable] [Qemu-devel] [PATCH] vl.c: fix regression when reading machine type from config file
Date: Tue, 6 Jan 2015 19:41:18 +0200

After 'Machine as QOM' series the machine type input triggers
the creation of the machine class.
If the machine type is set in the configuration file, the machine
class is not updated accordingly and remains the default.

Fixed that by querying the machine options after the configuration
file is loaded.

Cc: address@hidden
Reported-by: William Dauchy <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
---
 vl.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/vl.c b/vl.c
index 7786b2f..ecd8c93 100644
--- a/vl.c
+++ b/vl.c
@@ -3659,6 +3659,11 @@ int main(int argc, char **argv, char **envp)
                             strerror(-ret));
                         exit(1);
                     }
+                    opts = qemu_get_machine_opts();
+                    optarg = qemu_opt_get(opts, "type");
+                    if (optarg) {
+                        machine_class = machine_parse(optarg);
+                    }
                     break;
                 }
             case QEMU_OPTION_spice:
-- 
2.1.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]