qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v7 25/28] qdev-props: remove errp from GlobalPro


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH v7 25/28] qdev-props: remove errp from GlobalProperty
Date: Fri, 21 Dec 2018 16:34:26 +0100

On Fri, 21 Dec 2018 13:04:07 +0400
Marc-André Lureau <address@hidden> wrote:

> All qdev_prop_register_global() set &error_fatal for errp, except
> '-rtc driftfix=slew', which arguably should also use &error_fatal, as
> otherwise failing to apply the property would only report a warning.
> 
> Signed-off-by: Marc-André Lureau <address@hidden>
> Reviewed-by: Igor Mammedov <address@hidden>
> ---
>  include/hw/qdev-core.h    | 6 ------
>  hw/core/qdev-properties.c | 4 ++--
>  qom/cpu.c                 | 1 -
>  target/i386/cpu.c         | 1 -
>  target/sparc/cpu.c        | 1 -
>  vl.c                      | 1 -
>  6 files changed, 2 insertions(+), 12 deletions(-)
> 

> diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
> index 3467e0485c..a2d25d3d37 100644
> --- a/hw/core/qdev-properties.c
> +++ b/hw/core/qdev-properties.c
> @@ -1238,8 +1238,8 @@ void qdev_prop_set_globals(DeviceState *dev)
>          if (err != NULL) {
>              error_prepend(&err, "can't apply global %s.%s=%s: ",
>                            prop->driver, prop->property, prop->value);
> -            if (!dev->hotplugged && prop->errp) {
> -                error_propagate(prop->errp, err);
> +            if (!dev->hotplugged) {
> +                error_propagate(&error_fatal, err);

Might want to add a comment to this function that any error is fatal
for non-hotplugged devices.

>              } else {
>                  warn_report_err(err);
>              }

Reviewed-by: Cornelia Huck <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]