aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-03-06 10:39:24 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2014-04-27 13:04:18 +0400
commite96e5ae880f0e5d4d372264e2a5cb91cba40f771 (patch)
tree2c07bec4d88ca17e1ddc2e46382e5a0d951d5588 /vl.c
parenteb6282f230b75eca057dd3b3027f1bfa100bef9c (diff)
qemu-option: introduce qemu_find_opts_singleton
Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/vl.c b/vl.c
index db9ea90a1d..5aad3bcca4 100644
--- a/vl.c
+++ b/vl.c
@@ -517,16 +517,7 @@ static QemuOptsList qemu_name_opts = {
*/
QemuOpts *qemu_get_machine_opts(void)
{
- QemuOptsList *list;
- QemuOpts *opts;
-
- list = qemu_find_opts("machine");
- assert(list);
- opts = qemu_opts_find(list, NULL);
- if (!opts) {
- opts = qemu_opts_create(list, NULL, 0, &error_abort);
- }
- return opts;
+ return qemu_find_opts_singleton("machine");
}
const char *qemu_get_vm_name(void)