qemu-e2k/hw/ppc
Markus Armbruster 4b5766488f error: Fix use of error_prepend() with &error_fatal, &error_abort
From include/qapi/error.h:

  * Pass an existing error to the caller with the message modified:
  *     error_propagate(errp, err);
  *     error_prepend(errp, "Could not frobnicate '%s': ", name);

Fei Li pointed out that doing error_propagate() first doesn't work
well when @errp is &error_fatal or &error_abort: the error_prepend()
is never reached.

Since I doubt fixing the documentation will stop people from getting
it wrong, introduce error_propagate_prepend(), in the hope that it
lures people away from using its constituents in the wrong order.
Update the instructions in error.h accordingly.

Convert existing error_prepend() next to error_propagate to
error_propagate_prepend().  If any of these get reached with
&error_fatal or &error_abort, the error messages improve.  I didn't
check whether that's the case anywhere.

Cc: Fei Li <fli@suse.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20181017082702.5581-2-armbru@redhat.com>
2018-10-19 14:51:34 +02:00
..
e500-ccsr.h
e500.c Drop "qemu:" prefix from error_report() arguments 2018-09-24 17:13:07 +02:00
e500.h
e500plat.c
fdt.c
mac_newworld.c mac_newworld: implement custom FWPathProvider 2018-08-30 10:42:18 +10:00
mac_oldworld.c mac_oldworld: implement custom FWPathProvider 2018-08-30 10:42:18 +10:00
mac.h macio: move MACIOIDEState type declarations to macio.h 2018-08-30 10:42:18 +10:00
Makefile.objs spapr: introduce a fixed IRQ number space 2018-08-21 14:28:45 +10:00
mpc8544_guts.c
mpc8544ds.c
pnv_bmc.c
pnv_core.c error: Fix use of error_prepend() with &error_fatal, &error_abort 2018-10-19 14:51:34 +02:00
pnv_lpc.c
pnv_occ.c
pnv_psi.c
pnv_xscom.c
pnv.c
ppc4xx_devs.c
ppc4xx_pci.c
ppc405_boards.c ppc: Remove deprecated ppcemb target 2018-08-28 11:31:23 +10:00
ppc405_uc.c hw/ppc/ppc405_uc: Convert away from old_mmio 2018-08-21 14:28:45 +10:00
ppc405.h
ppc440_bamboo.c ppc: Remove deprecated ppcemb target 2018-08-28 11:31:23 +10:00
ppc440_pcix.c sam460ex: Fix PCI interrupts with multiple devices 2018-08-01 11:01:38 +10:00
ppc440_uc.c ppc440_uc: Fix a copy/paste error 2018-07-07 12:12:27 +10:00
ppc440.h ppc440_uc: Basic emulation of PPC440 DMA controller 2018-07-03 09:56:52 +10:00
ppc_booke.c
ppc.c
ppce500_spin.c
prep_systemio.c
prep.c 40p: add fixed IRQ routing for LSI SCSI device 2018-09-25 11:12:25 +10:00
rs6000_mc.c
sam460ex.c Error reporting & miscellaneous patches for 2018-09-24 2018-09-25 11:37:39 +01:00
spapr_caps.c spapr: compute default value of "hpt-max-page-size" later 2018-07-03 10:20:15 +10:00
spapr_cpu_core.c target/ppc/kvm: set vcpu as online/offline 2018-09-05 16:06:19 +10:00
spapr_drc.c
spapr_events.c spapr: introduce a fixed IRQ number space 2018-08-21 14:28:45 +10:00
spapr_hcall.c
spapr_iommu.c
spapr_irq.c spapr: increase the size of the IRQ number space 2018-09-25 11:12:25 +10:00
spapr_ovec.c
spapr_pci_vfio.c
spapr_pci.c error: Fix use of error_prepend() with &error_fatal, &error_abort 2018-10-19 14:51:34 +02:00
spapr_rng.c
spapr_rtas_ddw.c
spapr_rtas.c target/ppc/kvm: set vcpu as online/offline 2018-09-05 16:06:19 +10:00
spapr_rtc.c qapi: Drop qapi_event_send_FOO()'s Error ** argument 2018-08-28 18:21:38 +02:00
spapr_vio.c spapr: introduce a fixed IRQ number space 2018-08-21 14:28:45 +10:00
spapr.c spapr_pci: add an extra 'nr_msis' argument to spapr_populate_pci_dt 2018-09-25 11:12:25 +10:00
trace-events
virtex_ml507.c ppc: Remove deprecated ppcemb target 2018-08-28 11:31:23 +10:00