mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-08 16:07:39 -06:00
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>
This commit is contained in:
parent
7bccd94026
commit
2ff3de685a
6 changed files with 33 additions and 75 deletions
|
@ -359,7 +359,6 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
|
|||
uint64_t elf_entry;
|
||||
hwaddr entry;
|
||||
int big_endian;
|
||||
QemuOpts *machine_opts;
|
||||
|
||||
/* Load the kernel. */
|
||||
if (!info->kernel_filename) {
|
||||
|
@ -367,12 +366,7 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0);
|
||||
if (machine_opts) {
|
||||
info->dtb_filename = qemu_opt_get(machine_opts, "dtb");
|
||||
} else {
|
||||
info->dtb_filename = NULL;
|
||||
}
|
||||
info->dtb_filename = qemu_opt_get(qemu_get_machine_opts(), "dtb");
|
||||
|
||||
if (!info->secondary_cpu_reset_hook) {
|
||||
info->secondary_cpu_reset_hook = default_reset_secondary;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue