From: Marcel Apfelbaum <marcel@redhat.com>
To: qemu-devel@nongnu.org
Cc: marcel@redhat.com, pbonzini@redhat.com, lersek@redhat.com
Subject: [Qemu-devel] [PATCH] vl.c: remove duplicate call to qemu_get_machine_opts
Date: Mon, 8 Feb 2016 13:45:51 +0200 [thread overview]
Message-ID: <1454931951-25212-1-git-send-email-marcel@redhat.com> (raw)
Also we can use current machine properties instead of querying machine's opts.
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
---
vl.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/vl.c b/vl.c
index 5873248..c03a4fe 100644
--- a/vl.c
+++ b/vl.c
@@ -4353,11 +4353,10 @@ int main(int argc, char **argv, char **envp)
qtest_init(qtest_chrdev, qtest_log, &error_fatal);
}
- machine_opts = qemu_get_machine_opts();
- kernel_filename = qemu_opt_get(machine_opts, "kernel");
- initrd_filename = qemu_opt_get(machine_opts, "initrd");
- kernel_cmdline = qemu_opt_get(machine_opts, "append");
- bios_name = qemu_opt_get(machine_opts, "firmware");
+ kernel_filename = current_machine->kernel_filename;
+ initrd_filename = current_machine->initrd_filename;
+ kernel_cmdline = current_machine->kernel_cmdline;
+ bios_name = current_machine->firmware;
opts = qemu_opts_find(qemu_find_opts("boot-opts"), NULL);
if (opts) {
--
2.4.3
next reply other threads:[~2016-02-08 11:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-08 11:45 Marcel Apfelbaum [this message]
2016-02-08 12:22 ` [Qemu-devel] [PATCH] vl.c: remove duplicate call to qemu_get_machine_opts Laszlo Ersek
2016-02-08 12:27 ` Marcel Apfelbaum
2016-02-08 16:47 ` Laszlo Ersek
2016-02-08 18:59 ` Marcel Apfelbaum
2016-02-08 19:23 ` Laszlo Ersek
2016-02-08 19:28 ` 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=1454931951-25212-1-git-send-email-marcel@redhat.com \
--to=marcel@redhat.com \
--cc=lersek@redhat.com \
--cc=pbonzini@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).