diff options
author | Joel Kitching <kitching@google.com> | 2019-07-31 13:17:08 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-06 15:14:47 +0000 |
commit | 90671fa6d2d3d48fab6408c7493be61bcee5868e (patch) | |
tree | 73a740440899a86d87fcec45717fba23ea9c2838 /tests/tlcl_tests.c | |
parent | 9c906110972f538ee5753845916ebd1f826f54b6 (diff) | |
download | vboot-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/tlcl_tests.c')
-rw-r--r-- | tests/tlcl_tests.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/tlcl_tests.c b/tests/tlcl_tests.c index fc6dee54..3bdb593e 100644 --- a/tests/tlcl_tests.c +++ b/tests/tlcl_tests.c @@ -18,7 +18,7 @@ /* Mock data */ static char debug_info[4096]; -static VbError_t mock_retval; +static vb2_error_t mock_retval; /* Call to mocked VbExTpmSendReceive() */ struct srcall @@ -29,7 +29,7 @@ struct srcall int req_size; /* Request size */ uint32_t req_cmd; /* Request command code */ int rsp_size; /* Response size */ - VbError_t retval; /* Value to return */ + vb2_error_t retval; /* Value to return */ }; #define MAXCALLS 8 @@ -65,13 +65,13 @@ static void SetResponse(int call_idx, uint32_t response_code, int rsp_size) /* Mocks */ -VbError_t VbExTpmInit(void) +vb2_error_t VbExTpmInit(void) { return mock_retval; } -VbError_t VbExTpmClose(void) +vb2_error_t VbExTpmClose(void) { return mock_retval; } @@ -98,7 +98,7 @@ uint32_t VbExTpmSendReceive(const uint8_t *request, uint32_t request_length, return c->retval; } -VbError_t VbExTpmGetRandom(uint8_t *buf, uint32_t length) +vb2_error_t VbExTpmGetRandom(uint8_t *buf, uint32_t length) { memset(buf, 0xa5, length); return VBERROR_SUCCESS; |