From e96e5ae880f0e5d4d372264e2a5cb91cba40f771 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 6 Mar 2014 10:39:24 +0100 Subject: qemu-option: introduce qemu_find_opts_singleton MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Laszlo Ersek Reviewed-by: Andreas Färber Signed-off-by: Paolo Bonzini Signed-off-by: Igor Mammedov Signed-off-by: Michael Tokarev --- vl.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'vl.c') 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) -- cgit v1.2.3