diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2018-05-29 14:48:19 -0300 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2018-06-12 09:33:52 +1000 |
commit | e20c63140a185c166e91d8c68a2aa6bb99e600c3 (patch) | |
tree | 05c07d03052c3caa65293ac720f47237c4bf46e6 /hw/ppc/spapr_drc.c | |
parent | 45fefe7c4d9bfc5a4a222d3d2c8244531e87130f (diff) | |
download | qemu-e20c63140a185c166e91d8c68a2aa6bb99e600c3.zip qemu-e20c63140a185c166e91d8c68a2aa6bb99e600c3.tar.gz qemu-e20c63140a185c166e91d8c68a2aa6bb99e600c3.tar.bz2 |
hw/ppc/spapr_drc: Replace error_setg(&error_abort) by error_report() + abort()
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 <eblake@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_drc.c')
-rw-r--r-- | hw/ppc/spapr_drc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 8a045d6..2edb7d1 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); |