qemu-e2k/hw/timer
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
..
a9gtimer.c
allwinner-a10-pit.c
altera_timer.c
arm_mptimer.c
arm_timer.c
armv7m_systick.c
aspeed_timer.c error: Fix use of error_prepend() with &error_fatal, &error_abort 2018-10-19 14:51:34 +02:00
cadence_ttc.c
cmsdk-apb-dualtimer.c hw/timer/cmsdk-apb-dualtimer: Add missing 'break' statements 2018-09-25 15:13:24 +01:00
cmsdk-apb-timer.c
digic-timer.c
ds1338.c
etraxfs_timer.c
exynos4210_mct.c
exynos4210_pwm.c
exynos4210_rtc.c
grlib_gptimer.c
hpet.c
i8254_common.c
i8254.c
imx_epit.c
imx_gpt.c
lm32_timer.c
m41t80.c
m48t59-internal.h
m48t59-isa.c
m48t59.c
Makefile.objs
mc146818rtc.c
milkymist-sysctl.c
mips_gictimer.c
mss-timer.c
omap_gptimer.c
omap_synctimer.c
pl031.c
puv3_ost.c
pxa2xx_timer.c
sh_timer.c
slavio_timer.c
stm32f2xx_timer.c
sun4v-rtc.c
trace-events
twl92230.c
xilinx_timer.c
xlnx-zynqmp-rtc.c