diff options
author | Joel Kitching <kitching@google.com> | 2019-08-01 13:36:44 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-06 06:07:01 +0000 |
commit | 9c906110972f538ee5753845916ebd1f826f54b6 (patch) | |
tree | 733c4d13b29a827c45159969baf4daec5147a0e5 /firmware/include/vboot_api.h | |
parent | 1db2f3801a8843a1d6380a0969d6836b41ca474e (diff) | |
download | vboot-9c906110972f538ee5753845916ebd1f826f54b6.tar.gz |
vboot/tpm: fix return type inconsistencies
TPM errors and vboot errors were getting mixed up.
Note that this patch changes a function signature in the
vboot1 API. Any callers of the function should be updated
accordingly.
BUG=b:124141368, chromium:988410
TEST=make clean && make runtests
BRANCH=none
Change-Id: Idf332ca9ac61b5771fccf9e2ce75e8689c0aace9
Signed-off-by: Joel Kitching <kitching@google.com>
Cq-Depend: chromium:1730374
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1729712
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'firmware/include/vboot_api.h')
-rw-r--r-- | firmware/include/vboot_api.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h index 6f5aab2b..86c00215 100644 --- a/firmware/include/vboot_api.h +++ b/firmware/include/vboot_api.h @@ -263,12 +263,22 @@ VbError_t VbExTpmClose(void); VbError_t VbExTpmOpen(void); /** + * Send request to TPM and receive response + * * Send a request_length-byte request to the TPM and receive a response. On * input, response_length is the size of the response buffer in bytes. On * exit, response_length is set to the actual received response length in - * bytes. */ -VbError_t VbExTpmSendReceive(const uint8_t *request, uint32_t request_length, - uint8_t *response, uint32_t *response_length); + * bytes. + * + * @param request Pointer to request buffer + * @param request_length Number of bytes to send + * @param response Pointer to response buffer + * @param response_length Size of response buffer; on return, + * set to number of received bytes + * @return TPM_SUCCESS, or non-zero if error. + */ +uint32_t VbExTpmSendReceive(const uint8_t *request, uint32_t request_length, + uint8_t *response, uint32_t *response_length); #ifdef CHROMEOS_ENVIRONMENT |