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

Side by Side Diff: tests/rollback_index_mock.c

Issue 2809037: Make vboot_reference build in MSVC command line environment. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: Integrated trunk changes. 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 unified diff | Download patch
« no previous file with comments | « tests/crc32_test.c ('k') | tests/sha_tests.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * Mock rollback index library for testing. 5 * Mock rollback index library for testing.
6 */ 6 */
7 7
8 #include "rollback_index.h" 8 #include "rollback_index.h"
9 #include "tss_constants.h" 9 #include "tss_constants.h"
10 10
11 #include <stdint.h>
12 #include <stdio.h> 11 #include <stdio.h>
13 12
14 uint16_t g_firmware_key_version = 0; 13 uint16_t g_firmware_key_version = 0;
15 uint16_t g_firmware_version = 0; 14 uint16_t g_firmware_version = 0;
16 uint16_t g_kernel_key_version = 0; 15 uint16_t g_kernel_key_version = 0;
17 uint16_t g_kernel_version = 0; 16 uint16_t g_kernel_version = 0;
18 17
18 /* disable MSVC warnings on unused arguments */
19 __pragma(warning (disable: 4100))
20
19 uint32_t SetupTPM(int mode, int developer_flag) { 21 uint32_t SetupTPM(int mode, int developer_flag) {
20 #ifndef NDEBUG 22 #ifndef NDEBUG
21 debug("Rollback Index Library Mock: TPM initialized.\n"); 23 debug("Rollback Index Library Mock: TPM initialized.\n");
22 #endif 24 #endif
23 return TPM_SUCCESS; 25 return TPM_SUCCESS;
24 } 26 }
25 27
26 uint32_t GetStoredVersions(int type, uint16_t* key_version, uint16_t* version) { 28 uint32_t GetStoredVersions(int type, uint16_t* key_version, uint16_t* version) {
27 switch (type) { 29 switch (type) {
28 case FIRMWARE_VERSIONS: 30 case FIRMWARE_VERSIONS:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #endif 62 #endif
61 return TPM_SUCCESS; 63 return TPM_SUCCESS;
62 } 64 }
63 65
64 uint32_t LockKernelVersionsByLockingPP(void) { 66 uint32_t LockKernelVersionsByLockingPP(void) {
65 #ifndef NDEBUG 67 #ifndef NDEBUG
66 debug("Rollback Index Library Mock: Kernel Versions Locked.\n"); 68 debug("Rollback Index Library Mock: Kernel Versions Locked.\n");
67 #endif 69 #endif
68 return TPM_SUCCESS; 70 return TPM_SUCCESS;
69 } 71 }
OLDNEW
« no previous file with comments | « tests/crc32_test.c ('k') | tests/sha_tests.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698