From c531ce9e068ad2ab07df90bd69cc379b7a7de986 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Jason Baron Date: Fri, 12 Oct 2012 19:44:30 +0200 Subject: [PATCH 3/7] Allow to leave type on default in -machine RH-Author: Jason Baron Message-id: Patchwork-id: 43069 O-Subject: [RHEL 6.4 qemu-kvm PATCH v4 3/7] Allow to leave type on default in -machine Bugzilla: 859447 RH-Acked-by: Markus Armbruster RH-Acked-by: Pavel Hrdina RH-Acked-by: Paolo Bonzini From: Jan Kiszka This allows to specify -machine options without setting an explicit machine type. We will pick the default machine in this case. Requesting the list of available machines is still possible via '-machine ?' e.g. Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori (cherry picked from commit 2645c6dcaf6ea2a51a3b6dfa407dd203004e4d11) Signed-off-by: Jason Baron --- vl.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) Signed-off-by: Michal Novotny --- vl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 77afed0..f349db9 100644 --- a/vl.c +++ b/vl.c @@ -5774,7 +5774,10 @@ int main(int argc, char **argv, char **envp) fprintf(stderr, "parse error: %s\n", optarg); exit(1); } - machine = machine_parse(qemu_opt_get(opts, "type")); + optarg = qemu_opt_get(opts, "type"); + if (optarg) { + machine = machine_parse(optarg); + } break; case QEMU_OPTION_usb: usb_enabled = 1; -- 1.7.11.7