summaryrefslogtreecommitdiff
path: root/tests/vboot_detach_menu_tests.c
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-07-31 13:17:08 +0800
committerCommit Bot <commit-bot@chromium.org>2019-08-06 15:14:47 +0000
commit90671fa6d2d3d48fab6408c7493be61bcee5868e (patch)
tree73a740440899a86d87fcec45717fba23ea9c2838 /tests/vboot_detach_menu_tests.c
parent9c906110972f538ee5753845916ebd1f826f54b6 (diff)
downloadvboot-90671fa6d2d3d48fab6408c7493be61bcee5868e.tar.gz
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 <kitching@google.com> Cq-Depend: chromium:1728112 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1722914 Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'tests/vboot_detach_menu_tests.c')
-rw-r--r--tests/vboot_detach_menu_tests.c20
1 files changed, 10 insertions, 10 deletions
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;