From 90671fa6d2d3d48fab6408c7493be61bcee5868e Mon Sep 17 00:00:00 2001 From: Joel Kitching Date: Wed, 31 Jul 2019 13:17:08 +0800 Subject: vboot: rename VbError_t typedef to vb2_error_t As part of the conversion of error codes from vboot1 to vboot2, replace all instances of VbError_t with vb2_error_t. vboot2 currently uses the int type for return values, but we would like to implement the use of vb2_error_t instead, which is potentially clearer than simply using an int. Existing functions will be converted to use vb2_error_t in a subsequent CL. BUG=b:124141368, chromium:988410 TEST=make clean && make runtests BRANCH=none Change-Id: Iee90d9a1f46bcf5f088e981ba6ddbcf886ff0f18 Signed-off-by: Joel Kitching Cq-Depend: chromium:1728112 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1722914 Reviewed-by: Julius Werner Commit-Queue: Joel Kitching Tested-by: Joel Kitching --- tests/vboot_detach_menu_tests.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/vboot_detach_menu_tests.c') diff --git a/tests/vboot_detach_menu_tests.c b/tests/vboot_detach_menu_tests.c index 4d618659..cba297b8 100644 --- a/tests/vboot_detach_menu_tests.c +++ b/tests/vboot_detach_menu_tests.c @@ -36,10 +36,10 @@ static struct vb2_gbb_header gbb; static int shutdown_request_calls_left; static int audio_looping_calls_left; -static VbError_t vbtlk_retval[5]; -static VbError_t vbtlk_last_retval; +static vb2_error_t vbtlk_retval[5]; +static vb2_error_t vbtlk_last_retval; static int vbtlk_retval_count; -static const VbError_t vbtlk_retval_fixed = 1002; +static const vb2_error_t vbtlk_retval_fixed = 1002; static int vbexlegacy_called; static enum VbAltFwIndex_t altfw_num; static int debug_info_displayed; @@ -199,7 +199,7 @@ int vb2_audio_looping(void) return 1; } -VbError_t VbTryLoadKernel(struct vb2_context *c, uint32_t get_info_flags) +vb2_error_t VbTryLoadKernel(struct vb2_context *c, uint32_t get_info_flags) { if (vbtlk_retval_count < ARRAY_SIZE(vbtlk_retval) && vbtlk_retval[vbtlk_retval_count] != 0) @@ -207,8 +207,8 @@ VbError_t VbTryLoadKernel(struct vb2_context *c, uint32_t get_info_flags) return vbtlk_last_retval + get_info_flags; } -VbError_t VbDisplayScreen(struct vb2_context *c, uint32_t screen, int force, - const VbScreenData *data) +vb2_error_t VbDisplayScreen(struct vb2_context *c, uint32_t screen, int force, + const VbScreenData *data) { if (screens_count < ARRAY_SIZE(screens_displayed)) screens_displayed[screens_count++] = screen; @@ -217,8 +217,8 @@ VbError_t VbDisplayScreen(struct vb2_context *c, uint32_t screen, int force, return VBERROR_SUCCESS; } -VbError_t VbDisplayMenu(struct vb2_context *c, uint32_t screen, int force, - uint32_t selected_index, uint32_t disabled_idx_mask) +vb2_error_t VbDisplayMenu(struct vb2_context *c, uint32_t screen, int force, + uint32_t selected_index, uint32_t disabled_idx_mask) { if (screens_count < ARRAY_SIZE(screens_displayed)) screens_displayed[screens_count++] = screen; @@ -232,13 +232,13 @@ VbError_t VbDisplayMenu(struct vb2_context *c, uint32_t screen, int force, return VBERROR_SUCCESS; } -VbError_t VbDisplayDebugInfo(struct vb2_context *c) +vb2_error_t VbDisplayDebugInfo(struct vb2_context *c) { debug_info_displayed = 1; return VBERROR_SUCCESS; } -VbError_t VbExBeep(uint32_t msec, uint32_t frequency) +vb2_error_t VbExBeep(uint32_t msec, uint32_t frequency) { if (beeps_count < ARRAY_SIZE(beeps_played)) beeps_played[beeps_count++] = frequency; -- cgit v1.2.1