stub: Print error messages by vb2ex_printf()

CL:3167016 in depthcharge mocks vb2ex_printf() to avoid segmentation
fault when running depthcharge unit tests, but the same problem still
exists for all vboot stub functions that use fprintf() to print error
messages. Instead of mocking all the vb2ex_* functions in depthcharge,
we use a simpler approach: always printing error messages using
vb2ex_printf() (or other equivalences) for vboot stubs.

TEST=make clean && make runtests
TEST=(depthcharge) make unit-tests

Change-Id: Idf758070a61b28284864a698475ca582719f4789
Signed-off-by: Yu-Ping Wu <>
Reviewed-by: Jakub Czapiga <>
Reviewed-by: Julius Werner <>
2 files changed