summaryrefslogtreecommitdiff
path: root/firmware/lib/include
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 /firmware/lib/include
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 'firmware/lib/include')
-rw-r--r--firmware/lib/include/ec_sync.h12
-rw-r--r--firmware/lib/include/load_kernel_fw.h2
-rw-r--r--firmware/lib/include/vboot_display.h8
-rw-r--r--firmware/lib/include/vboot_kernel.h12
-rw-r--r--firmware/lib/include/vboot_ui_menu_private.h2
5 files changed, 18 insertions, 18 deletions
diff --git a/firmware/lib/include/ec_sync.h b/firmware/lib/include/ec_sync.h
index 303ea2a4..e71d68b0 100644
--- a/firmware/lib/include/ec_sync.h
+++ b/firmware/lib/include/ec_sync.h
@@ -23,7 +23,7 @@ struct vb2_context;
* reboot back to its RO code to continue EC sync, or other non-zero error
* code.
*/
-VbError_t ec_sync_phase1(struct vb2_context *ctx);
+vb2_error_t ec_sync_phase1(struct vb2_context *ctx);
/**
* Returns non-zero if the EC will perform a slow update during phase 2.
@@ -44,7 +44,7 @@ int ec_will_update_slowly(struct vb2_context *ctx);
* @param severity VB_AUX_FW_{NO,FAST,SLOW}_UPDATE
* @return VBERROR_SUCCESS or non-zero error code.
*/
-VbError_t ec_sync_check_aux_fw(struct vb2_context *ctx,
+vb2_error_t ec_sync_check_aux_fw(struct vb2_context *ctx,
VbAuxFwUpdateSeverity_t *severity);
/**
@@ -53,7 +53,7 @@ VbError_t ec_sync_check_aux_fw(struct vb2_context *ctx,
* @param ctx Vboot2 context
* @return VBERROR_SUCCESS or non-zero error code.
*/
-VbError_t ec_sync_update_aux_fw(struct vb2_context *ctx);
+vb2_error_t ec_sync_update_aux_fw(struct vb2_context *ctx);
/**
* EC sync, phase 2
@@ -69,7 +69,7 @@ VbError_t ec_sync_update_aux_fw(struct vb2_context *ctx);
* reboot back to its RO code to continue EC sync, or other non-zero error
* code.
*/
-VbError_t ec_sync_phase2(struct vb2_context *ctx);
+vb2_error_t ec_sync_phase2(struct vb2_context *ctx);
/**
* EC sync, phase 3
@@ -79,7 +79,7 @@ VbError_t ec_sync_phase2(struct vb2_context *ctx);
* @param ctx Vboot2 context
* @return VBERROR_SUCCESS or non-zero error code.
*/
-VbError_t ec_sync_phase3(struct vb2_context *ctx);
+vb2_error_t ec_sync_phase3(struct vb2_context *ctx);
/**
* Sync all EC devices to expected versions.
@@ -89,6 +89,6 @@ VbError_t ec_sync_phase3(struct vb2_context *ctx);
* @param ctx Vboot context
* @return VBERROR_SUCCESS, or non-zero if error.
*/
-VbError_t ec_sync_all(struct vb2_context *ctx);
+vb2_error_t ec_sync_all(struct vb2_context *ctx);
#endif /* VBOOT_REFERENCE_EC_SYNC_H_ */
diff --git a/firmware/lib/include/load_kernel_fw.h b/firmware/lib/include/load_kernel_fw.h
index 87e0e2ab..4b7fb639 100644
--- a/firmware/lib/include/load_kernel_fw.h
+++ b/firmware/lib/include/load_kernel_fw.h
@@ -65,6 +65,6 @@ typedef struct LoadKernelParams {
* Returns VBERROR_SUCCESS if successful. If unsuccessful, sets a recovery
* reason via VbNvStorage and returns an error code.
*/
-VbError_t LoadKernel(struct vb2_context *ctx, LoadKernelParams *params);
+vb2_error_t LoadKernel(struct vb2_context *ctx, LoadKernelParams *params);
#endif /* VBOOT_REFERENCE_LOAD_KERNEL_FW_H_ */
diff --git a/firmware/lib/include/vboot_display.h b/firmware/lib/include/vboot_display.h
index ed259a0c..6dfaeaa9 100644
--- a/firmware/lib/include/vboot_display.h
+++ b/firmware/lib/include/vboot_display.h
@@ -8,13 +8,13 @@
#ifndef VBOOT_REFERENCE_VBOOT_DISPLAY_H_
#define VBOOT_REFERENCE_VBOOT_DISPLAY_H_
-VbError_t VbDisplayScreen(struct vb2_context *ctx, uint32_t screen, int force,
+vb2_error_t VbDisplayScreen(struct vb2_context *ctx, uint32_t screen, int force,
const VbScreenData *data);
-VbError_t VbDisplayMenu(struct vb2_context *ctx,
+vb2_error_t VbDisplayMenu(struct vb2_context *ctx,
uint32_t screen, int force, uint32_t selected_index,
uint32_t disabled_idx_mask);
-VbError_t VbDisplayDebugInfo(struct vb2_context *ctx);
-VbError_t VbCheckDisplayKey(struct vb2_context *ctx, uint32_t key,
+vb2_error_t VbDisplayDebugInfo(struct vb2_context *ctx);
+vb2_error_t VbCheckDisplayKey(struct vb2_context *ctx, uint32_t key,
const VbScreenData *data);
/**
diff --git a/firmware/lib/include/vboot_kernel.h b/firmware/lib/include/vboot_kernel.h
index fe8d7023..61ce2c93 100644
--- a/firmware/lib/include/vboot_kernel.h
+++ b/firmware/lib/include/vboot_kernel.h
@@ -52,32 +52,32 @@ int VbUserConfirms(struct vb2_context *ctx, uint32_t confirm_flags);
/**
* Handle a normal boot.
*/
-VbError_t VbBootNormal(struct vb2_context *ctx);
+vb2_error_t VbBootNormal(struct vb2_context *ctx);
/**
* Handle a developer-mode boot.
*/
-VbError_t VbBootDeveloper(struct vb2_context *ctx);
+vb2_error_t VbBootDeveloper(struct vb2_context *ctx);
/**
* Handle a diagnostic-mode boot.
*/
-VbError_t VbBootDiagnostic(struct vb2_context *ctx);
+vb2_error_t VbBootDiagnostic(struct vb2_context *ctx);
/**
* Handle a recovery-mode boot.
*/
-VbError_t VbBootRecovery(struct vb2_context *ctx);
+vb2_error_t VbBootRecovery(struct vb2_context *ctx);
/**
* Handle a developer-mode boot using detachable menu ui
*/
-VbError_t VbBootDeveloperMenu(struct vb2_context *ctx);
+vb2_error_t VbBootDeveloperMenu(struct vb2_context *ctx);
/**
* Handle a recovery-mode boot using detachable menu ui
*/
-VbError_t VbBootRecoveryMenu(struct vb2_context *ctx);
+vb2_error_t VbBootRecoveryMenu(struct vb2_context *ctx);
/**
* Return the current FWMP flags. Valid only inside VbSelectAndLoadKernel().
diff --git a/firmware/lib/include/vboot_ui_menu_private.h b/firmware/lib/include/vboot_ui_menu_private.h
index aef2dff6..b92fb5da 100644
--- a/firmware/lib/include/vboot_ui_menu_private.h
+++ b/firmware/lib/include/vboot_ui_menu_private.h
@@ -13,7 +13,7 @@
struct vb2_menu_item {
const char *text;
- VbError_t (*action)(struct vb2_context *ctx);
+ vb2_error_t (*action)(struct vb2_context *ctx);
};
struct vb2_menu {