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

Unified Diff: tests/rollback_index_mock.c

Issue 2735004: Uses TPM return codes. (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Created 10 years, 6 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 | « no previous file | vboot_firmware/include/rollback_index.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/rollback_index_mock.c
diff --git a/tests/rollback_index_mock.c b/tests/rollback_index_mock.c
index 9640e316b11d1f340607016c73cc7512b802d04f..2e1e5ee15d3ed763eeb5c1bdd5dfdbc3d75e89b9 100644
--- a/tests/rollback_index_mock.c
+++ b/tests/rollback_index_mock.c
@@ -15,13 +15,14 @@ uint16_t g_firmware_version = 0;
uint16_t g_kernel_key_version = 0;
uint16_t g_kernel_version = 0;
-void SetupTPM(void) {
+int SetupTPM(void) {
#ifndef NDEBUG
debug("Rollback Index Library Mock: TPM initialized.\n");
#endif
+ return 0;
}
-void GetStoredVersions(int type, uint16_t* key_version, uint16_t* version) {
+int GetStoredVersions(int type, uint16_t* key_version, uint16_t* version) {
switch (type) {
case FIRMWARE_VERSIONS:
*key_version = g_firmware_key_version;
@@ -32,6 +33,7 @@ void GetStoredVersions(int type, uint16_t* key_version, uint16_t* version) {
*version = g_kernel_version;
break;
}
+ return 0;
}
int WriteStoredVersions(int type, uint16_t key_version, uint16_t version) {
@@ -48,16 +50,18 @@ int WriteStoredVersions(int type, uint16_t key_version, uint16_t version) {
#ifndef NDEBUG
debug("Rollback Index Library Mock: Stored Versions written.\n");
#endif
- return 1;
+ return 0;
}
-void LockFirmwareVersions() {
+int LockFirmwareVersions() {
#ifndef NDEBUG
debug("Rollback Index Library Mock: Firmware Versions Locked.\n");
#endif
+ return 0;
}
-void LockKernelVersionsByLockingPP() {
+int LockKernelVersionsByLockingPP() {
#ifndef NDEBUG
debug("Rollback Index Library Mock: Kernel Versions Locked.\n");
#endif
+ return 0;
}
« no previous file with comments | « no previous file | vboot_firmware/include/rollback_index.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698