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

Side by Side Diff: firmware/stub/tpm_lite_stub.c

Issue 3423022: Fix test suite deficiencies. (Closed) Base URL: http://git.chromium.org/git/vboot_reference.git
Patch Set: Address review comments. Created 10 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | firmware/version.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 * Stub implementations of utility functions which call their linux-specific 5 * Stub implementations of utility functions which call their linux-specific
6 * equivalents. 6 * equivalents.
7 */ 7 */
8 8
9 #define _STUB_IMPLEMENTATION_ 9 #define _STUB_IMPLEMENTATION_
10 #include "tlcl.h" 10 #include "tlcl.h"
(...skipping 18 matching lines...) Expand all
29 * remove the wrappers and call us directly. */ 29 * remove the wrappers and call us directly. */
30 30
31 31
32 /* The file descriptor for the TPM device. 32 /* The file descriptor for the TPM device.
33 */ 33 */
34 static int tpm_fd = -1; 34 static int tpm_fd = -1;
35 35
36 36
37 /* Print |n| bytes from array |a|, with newlines. 37 /* Print |n| bytes from array |a|, with newlines.
38 */ 38 */
39 POSSIBLY_UNUSED static void PrintBytes(uint8_t* a, int n) { 39 POSSIBLY_UNUSED static void PrintBytes(const uint8_t* a, int n) {
40 int i; 40 int i;
41 for (i = 0; i < n; i++) { 41 for (i = 0; i < n; i++) {
42 VBDEBUG(("%02x ", a[i])); 42 VBDEBUG(("%02x ", a[i]));
43 if ((i + 1) % 16 == 0) { 43 if ((i + 1) % 16 == 0) {
44 VBDEBUG(("\n")); 44 VBDEBUG(("\n"));
45 } 45 }
46 } 46 }
47 if (i % 16 != 0) { 47 if (i % 16 != 0) {
48 VBDEBUG(("\n")); 48 VBDEBUG(("\n"));
49 } 49 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 (tag == TPM_TAG_RQU_COMMAND && 178 (tag == TPM_TAG_RQU_COMMAND &&
179 response_tag == TPM_TAG_RSP_COMMAND) || 179 response_tag == TPM_TAG_RSP_COMMAND) ||
180 (tag == TPM_TAG_RQU_AUTH1_COMMAND && 180 (tag == TPM_TAG_RQU_AUTH1_COMMAND &&
181 response_tag == TPM_TAG_RSP_AUTH1_COMMAND) || 181 response_tag == TPM_TAG_RSP_AUTH1_COMMAND) ||
182 (tag == TPM_TAG_RQU_AUTH2_COMMAND && 182 (tag == TPM_TAG_RQU_AUTH2_COMMAND &&
183 response_tag == TPM_TAG_RSP_AUTH2_COMMAND)); 183 response_tag == TPM_TAG_RSP_AUTH2_COMMAND));
184 assert(response_length == TpmResponseSize(response)); 184 assert(response_length == TpmResponseSize(response));
185 185
186 return 0; /* Success */ 186 return 0; /* Success */
187 } 187 }
OLDNEW
« no previous file with comments | « no previous file | firmware/version.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698