]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vl: Report accelerator not supported for target more nicely
authorChen Gang <gang.chen.5i5j@gmail.com>
Fri, 4 Apr 2014 09:39:33 +0000 (17:39 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 18 Apr 2014 06:33:36 +0000 (10:33 +0400)
When you ask for an accelerator not supported for your target, you get
a bogus "accelerator does not exist" message:

  $ qemu-system-arm -machine none,accel=kvm
  KVM not supported for this target
  "kvm" accelerator does not exist.
  No accelerator found!

Suppress it.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
vl.c

diff --git a/vl.c b/vl.c
index 9975e5a4e3d5d9a89133816e02647be1a73bd7f1..db9ea90a1d128879f90400e65f14146f38d56648 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2740,7 +2740,7 @@ static int configure_accelerator(QEMUMachine *machine)
                 if (!accel_list[i].available()) {
                     printf("%s not supported for this target\n",
                            accel_list[i].name);
-                    continue;
+                    break;
                 }
                 *(accel_list[i].allowed) = true;
                 ret = accel_list[i].init(machine);