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

Side by Side Diff: utility/load_kernel_test.c

Issue 2820004: fix typos in load_kernel_test (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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 5
6 /* Routines for verifying a file's signature. Useful in testing the core 6 /* Routines for verifying a file's signature. Useful in testing the core
7 * RSA verification implementation. 7 * RSA verification implementation.
8 */ 8 */
9 9
10 #include <inttypes.h> /* For PRIu64 macro */ 10 #include <inttypes.h> /* For PRIu64 macro */
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 fprintf(stderr, "usage: %s <drive_image> <sign_key>\n", argv[0]); 91 fprintf(stderr, "usage: %s <drive_image> <sign_key>\n", argv[0]);
92 return 1; 92 return 1;
93 } 93 }
94 image_name = argv[1]; 94 image_name = argv[1];
95 keyfile_name = argv[2]; 95 keyfile_name = argv[2];
96 96
97 /* Read header signing key blob */ 97 /* Read header signing key blob */
98 { 98 {
99 uint64_t key_size; 99 uint64_t key_size;
100 lkp.header_sign_key_blob = ReadFile(keyfile_name, &key_size); 100 lkp.header_sign_key_blob = ReadFile(keyfile_name, &key_size);
101 if (!lkp.header_sign_key_blob) 101 if (!lkp.header_sign_key_blob) {
102 fprintf(stderr, "Unable to read key file %s\n", keyfile_name); 102 fprintf(stderr, "Unable to read key file %s\n", keyfile_name);
103 return 1; 103 return 1;
104 } 104 }
105 }
105 106
106 /* Get image size */ 107 /* Get image size */
107 printf("Reading from image: %s\n", image_name); 108 printf("Reading from image: %s\n", image_name);
108 image_file = fopen(image_name, "rb"); 109 image_file = fopen(image_name, "rb");
109 if (!image_file) { 110 if (!image_file) {
110 fprintf(stderr, "Unable to open image file %s\n", image_name); 111 fprintf(stderr, "Unable to open image file %s\n", image_name);
111 return 1; 112 return 1;
112 } 113 }
113 fseek(image_file, 0, SEEK_END); 114 fseek(image_file, 0, SEEK_END);
114 lkp.ending_lba = (ftell(image_file) / LBA_BYTES) - 1; 115 lkp.ending_lba = (ftell(image_file) / LBA_BYTES) - 1;
(...skipping 17 matching lines...) Expand all
132 if (LOAD_KERNEL_SUCCESS == rv) { 133 if (LOAD_KERNEL_SUCCESS == rv) {
133 printf("Partition number: %" PRIu64 "\n", lkp.partition_number); 134 printf("Partition number: %" PRIu64 "\n", lkp.partition_number);
134 printf("Bootloader address: %" PRIu64 "\n", lkp.bootloader_address); 135 printf("Bootloader address: %" PRIu64 "\n", lkp.bootloader_address);
135 printf("Bootloader size: %" PRIu64 "\n", lkp.bootloader_size); 136 printf("Bootloader size: %" PRIu64 "\n", lkp.bootloader_size);
136 } 137 }
137 138
138 fclose(image_file); 139 fclose(image_file);
139 Free(lkp.kernel_buffer); 140 Free(lkp.kernel_buffer);
140 return 0; 141 return 0;
141 } 142 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698