diff options
author | Markus Armbruster <armbru@redhat.com> | 2013-07-04 15:09:22 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-07-09 13:38:58 -0500 |
commit | 2ff3de685a875ece3ee21256736c0a9dbf39dc4c (patch) | |
tree | 4dc758ba80a89c26d47b93b2c5282e27cdacc443 /hw/ppc/e500.c | |
parent | 7bccd9402691e712305bc3b5cc6cf2fa1cc27631 (diff) | |
download | hqemu-2ff3de685a875ece3ee21256736c0a9dbf39dc4c.zip hqemu-2ff3de685a875ece3ee21256736c0a9dbf39dc4c.tar.gz |
Simplify -machine option queries with qemu_get_machine_opts()
The previous two commits fixed bugs in -machine option queries. I
can't find fault with the remaining queries, but let's use
qemu_get_machine_opts() everywhere, for consistency, simplicity and
robustness.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372943363-24081-7-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ppc/e500.c')
-rw-r--r-- | hw/ppc/e500.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 2f3018d..ee7e49a 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -137,7 +137,6 @@ static int ppce500_load_device_tree(CPUPPCState *env, uint32_t clock_freq = 400000000; uint32_t tb_freq = 400000000; int i; - const char *toplevel_compat = NULL; /* user override */ char compatible_sb[] = "fsl,mpc8544-immr\0simple-bus"; char soc[128]; char mpic[128]; @@ -158,14 +157,9 @@ static int ppce500_load_device_tree(CPUPPCState *env, 0x0, 0xe1000000, 0x0, 0x10000, }; - QemuOpts *machine_opts; - const char *dtb_file = NULL; - - machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0); - if (machine_opts) { - dtb_file = qemu_opt_get(machine_opts, "dtb"); - toplevel_compat = qemu_opt_get(machine_opts, "dt_compatible"); - } + QemuOpts *machine_opts = qemu_get_machine_opts(); + const char *dtb_file = qemu_opt_get(machine_opts, "dtb"); + const char *toplevel_compat = qemu_opt_get(machine_opts, "dt_compatible"); if (dtb_file) { char *filename; |