OSDN Git Service

loader-fit: Wean off error_printf()
authorMarkus Armbruster <armbru@redhat.com>
Wed, 17 Apr 2019 19:06:29 +0000 (21:06 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 17 Apr 2019 19:21:49 +0000 (21:21 +0200)
commit3eb99edb4800831ed36fa38e095d3fe98b2c1124
tree4210839b54556ee038b5ef0dc51510131976c0a8
parent6b3048cee0e0eccd27b62954ecc57c4a1bceb976
loader-fit: Wean off error_printf()

load_fit() reports errors with error_printf() instead of
error_report().  Worse, it even reports errors it actually recovers
from, in fit_cfg_compatible() and fit_load_fdt().  Messed up in
initial commit 51b58561c1d.

Convert the helper functions for load_fit() to Error.  Make sure each
failure path sets an error.

Fix fit_cfg_compatible() and fit_load_fdt() not to report errors they
actually recover from.

Convert load_fit() to error_report().

Cc: Paul Burton <pburton@wavecomp.com>
Cc: Aleksandar Rikalo <arikalo@wavecomp.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190417190641.26814-4-armbru@redhat.com>
hw/core/loader-fit.c