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

Unified Diff: tests/rollback_index_mock.c

Issue 2711006: Import recent tpm_lite changes that make all TPM commands return a status. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: cleanup from gauravsh's feedback 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 | « tests/Makefile ('k') | vboot_firmware/include/firmware_image_fw.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 2e1e5ee15d3ed763eeb5c1bdd5dfdbc3d75e89b9..d3da5b0daf78b2ecf309009b6f29f54aed76401f 100644
--- a/tests/rollback_index_mock.c
+++ b/tests/rollback_index_mock.c
@@ -6,6 +6,7 @@
*/
#include "rollback_index.h"
+#include "tss_constants.h"
#include <stdint.h>
#include <stdio.h>
@@ -15,14 +16,14 @@ uint16_t g_firmware_version = 0;
uint16_t g_kernel_key_version = 0;
uint16_t g_kernel_version = 0;
-int SetupTPM(void) {
+uint32_t SetupTPM(void) {
#ifndef NDEBUG
debug("Rollback Index Library Mock: TPM initialized.\n");
#endif
- return 0;
+ return TPM_SUCCESS;
}
-int GetStoredVersions(int type, uint16_t* key_version, uint16_t* version) {
+uint32_t GetStoredVersions(int type, uint16_t* key_version, uint16_t* version) {
switch (type) {
case FIRMWARE_VERSIONS:
*key_version = g_firmware_key_version;
@@ -33,10 +34,10 @@ int GetStoredVersions(int type, uint16_t* key_version, uint16_t* version) {
*version = g_kernel_version;
break;
}
- return 0;
+ return TPM_SUCCESS;
}
-int WriteStoredVersions(int type, uint16_t key_version, uint16_t version) {
+uint32_t WriteStoredVersions(int type, uint16_t key_version, uint16_t version) {
switch (type) {
case FIRMWARE_VERSIONS:
g_firmware_key_version = key_version;
@@ -50,18 +51,19 @@ int WriteStoredVersions(int type, uint16_t key_version, uint16_t version) {
#ifndef NDEBUG
debug("Rollback Index Library Mock: Stored Versions written.\n");
#endif
- return 0;
+ return TPM_SUCCESS;
}
-int LockFirmwareVersions() {
+uint32_t LockFirmwareVersions(void) {
#ifndef NDEBUG
debug("Rollback Index Library Mock: Firmware Versions Locked.\n");
#endif
- return 0;
+ return TPM_SUCCESS;
}
-int LockKernelVersionsByLockingPP() {
+
+uint32_t LockKernelVersionsByLockingPP(void) {
#ifndef NDEBUG
debug("Rollback Index Library Mock: Kernel Versions Locked.\n");
#endif
- return 0;
+ return TPM_SUCCESS;
}
« no previous file with comments | « tests/Makefile ('k') | vboot_firmware/include/firmware_image_fw.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698