On Tue, May 29, 2018 at 02:48:19PM -0300, Philippe Mathieu-Daudé wrote: > Use error_report() + abort() instead of error_setg(&error_abort), > as suggested by the "qapi/error.h" documentation: > > Please don't error_setg(&error_fatal, ...), use error_report() and > exit(), because that's more obvious. > Likewise, don't error_setg(&error_abort, ...), use assert(). > > Use abort() instead of the suggested assert() because the error message > already got displayed. > > Suggested-by: Eric Blake <[email protected]> > Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Applied to ppc-for-2.13, thanks.
> ---
> hw/ppc/spapr_drc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
> index 8a045d6b93..2edb7d1e9c 100644
> --- a/hw/ppc/spapr_drc.c
> +++ b/hw/ppc/spapr_drc.c
> @@ -366,7 +366,8 @@ static void prop_get_fdt(Object *obj, Visitor *v, const
> char *name,
> break;
> }
> default:
> - error_setg(&error_abort, "device FDT in unexpected state: %d",
> tag);
> + error_report("device FDT in unexpected state: %d", tag);
> + abort();
> }
> fdt_offset = fdt_offset_next;
> } while (fdt_depth != 0);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
