mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
qdev-props: call object_apply_global_props()
It's now possible to use the common function. Teach object_apply_global_props() to warn if Error argument is NULL. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
cff8b715c0
commit
50545b2cc0
2 changed files with 13 additions and 23 deletions
12
qom/object.c
12
qom/object.c
|
@ -390,7 +390,17 @@ void object_apply_global_props(Object *obj, const GPtrArray *props, Error **errp
|
|||
if (err != NULL) {
|
||||
error_prepend(&err, "can't apply global %s.%s=%s: ",
|
||||
p->driver, p->property, p->value);
|
||||
error_propagate(errp, err);
|
||||
/*
|
||||
* If errp != NULL, propagate error and return.
|
||||
* If errp == NULL, report a warning, but keep going
|
||||
* with the remaining globals.
|
||||
*/
|
||||
if (errp) {
|
||||
error_propagate(errp, err);
|
||||
return;
|
||||
} else {
|
||||
warn_report_err(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue