Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(989)

Unified Diff: src/platform/tpm_lite/src/tlcl/tlcl.c

Issue 2289002: Make more functions return a status. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/tpm_lite/src/tlcl/tlcl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/tpm_lite/src/tlcl/tlcl.c
diff --git a/src/platform/tpm_lite/src/tlcl/tlcl.c b/src/platform/tpm_lite/src/tlcl/tlcl.c
index 5afe83e30cb74d810b81b3c66a7bc772af4aee96..3d34d6c32b551dbf5b668b69258fd08d57ea9d0a 100644
--- a/src/platform/tpm_lite/src/tlcl/tlcl.c
+++ b/src/platform/tpm_lite/src/tlcl/tlcl.c
@@ -312,8 +312,10 @@ void TlclAssertPhysicalPresence(void) {
Send(tpm_ppassert_cmd.buffer);
}
-void TlclLockPhysicalPresence(void) {
- Send(tpm_pplock_cmd.buffer);
+uint32_t TlclLockPhysicalPresence(void) {
+ uint8_t response[TPM_LARGE_ENOUGH_COMMAND_SIZE];
+ SendReceive(tpm_pplock_cmd.buffer, response, sizeof(response));
+ return TpmReturnCode(response);
}
void TlclSetNvLocked(void) {
@@ -372,8 +374,7 @@ int TlclGetFlags(uint8_t* disable, uint8_t* deactivated) {
return result;
}
-void TlclSetGlobalLock(void) {
+uint32_t TlclSetGlobalLock(void) {
uint32_t x;
- uint32_t result = TlclWrite(TPM_NV_INDEX0, (uint8_t*) &x, 0);
- assert(result == TPM_SUCCESS);
+ return TlclWrite(TPM_NV_INDEX0, (uint8_t*) &x, 0);
}
« no previous file with comments | « src/platform/tpm_lite/src/tlcl/tlcl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698