]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qdev: Don't stop applying globals on first error
authorEduardo Habkost <ehabkost@redhat.com>
Wed, 15 Jun 2016 17:59:46 +0000 (14:59 -0300)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 7 Jul 2016 18:24:47 +0000 (15:24 -0300)
qdev_prop_set_globals_for_type() stops applying global properties
on the first error. It is a leftover from when QEMU exited on any
error when applying global property. Commit 25f8dd9 changed the
fatal error to a warning, but neglected to drop the stopping.
Fix that.

For example, the following command-line will not set CPUID level
to 3, but will warn only about "x86_64-cpu.vendor" being ignored.

  $ ./x86_64-softmmu/qemu-system-x86_64 \
      -global x86_64-cpu.vendor=x \
      -global x86_64-cpu.level=3
  qemu-system-x86_64: Warning: global x86_64-cpu.vendor=x ignored: Property '.vendor' doesn't take value 'x'

Fix this by not returning from qdev_prop_set_globals_for_type()
on the first error.

Cc: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/core/qdev-properties.c

index e3b2184a602c182318087a7c32b8bff5bcc76c62..c10edeecf122f946fb79aa3d103558334caef4b0 100644 (file)
@@ -1088,7 +1088,6 @@ static void qdev_prop_set_globals_for_type(DeviceState *dev,
             assert(prop->user_provided);
             error_reportf_err(err, "Warning: global %s.%s=%s ignored: ",
                               prop->driver, prop->property, prop->value);
-            return;
         }
     }
 }