mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
qdev: ignore GlobalProperty.errp for hotplugged devices
This patch ensures QEMU won't terminate while hotplugging a device if the global property cannot be set and errp points to error_fatal or error_abort. While here, it also fixes indentation of the typename argument. Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
78a3930685
commit
b3443f43f4
2 changed files with 5 additions and 3 deletions
|
@ -1084,7 +1084,7 @@ int qdev_prop_check_globals(void)
|
|||
}
|
||||
|
||||
static void qdev_prop_set_globals_for_type(DeviceState *dev,
|
||||
const char *typename)
|
||||
const char *typename)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
|
@ -1100,7 +1100,7 @@ static void qdev_prop_set_globals_for_type(DeviceState *dev,
|
|||
if (err != NULL) {
|
||||
error_prepend(&err, "can't apply global %s.%s=%s: ",
|
||||
prop->driver, prop->property, prop->value);
|
||||
if (prop->errp) {
|
||||
if (!dev->hotplugged && prop->errp) {
|
||||
error_propagate(prop->errp, err);
|
||||
} else {
|
||||
assert(prop->user_provided);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue