OLD | NEW |
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 lkp.boot_flags = BOOT_FLAG_SKIP_ADDR_CHECK | BOOT_FLAG_RECOVERY; | 128 lkp.boot_flags = BOOT_FLAG_SKIP_ADDR_CHECK | BOOT_FLAG_RECOVERY; |
129 } | 129 } |
130 /* Call LoadKernel() */ | 130 /* Call LoadKernel() */ |
131 rv = LoadKernel(&lkp); | 131 rv = LoadKernel(&lkp); |
132 printf("LoadKernel() returned %d\n", rv); | 132 printf("LoadKernel() returned %d\n", rv); |
133 | 133 |
134 if (LOAD_KERNEL_SUCCESS == rv) { | 134 if (LOAD_KERNEL_SUCCESS == rv) { |
135 printf("Partition number: %" PRIu64 "\n", lkp.partition_number); | 135 printf("Partition number: %" PRIu64 "\n", lkp.partition_number); |
136 printf("Bootloader address: %" PRIu64 "\n", lkp.bootloader_address); | 136 printf("Bootloader address: %" PRIu64 "\n", lkp.bootloader_address); |
137 printf("Bootloader size: %" PRIu64 "\n", lkp.bootloader_size); | 137 printf("Bootloader size: %" PRIu64 "\n", lkp.bootloader_size); |
| 138 printf("Partition guid: " |
| 139 "%02x%02x%02x%02x-%02x%02x-%02x%02x" |
| 140 "-%02x%02x-%02x%02x%02x%02x%02x%02x\n", |
| 141 lkp.partition_guid[3], |
| 142 lkp.partition_guid[2], |
| 143 lkp.partition_guid[1], |
| 144 lkp.partition_guid[0], |
| 145 lkp.partition_guid[5], |
| 146 lkp.partition_guid[4], |
| 147 lkp.partition_guid[7], |
| 148 lkp.partition_guid[6], |
| 149 lkp.partition_guid[8], |
| 150 lkp.partition_guid[9], |
| 151 lkp.partition_guid[10], |
| 152 lkp.partition_guid[11], |
| 153 lkp.partition_guid[12], |
| 154 lkp.partition_guid[13], |
| 155 lkp.partition_guid[14], |
| 156 lkp.partition_guid[15]); |
138 } | 157 } |
139 | 158 |
140 fclose(image_file); | 159 fclose(image_file); |
141 Free(lkp.kernel_buffer); | 160 Free(lkp.kernel_buffer); |
142 return rv != LOAD_KERNEL_SUCCESS; | 161 return rv != LOAD_KERNEL_SUCCESS; |
143 } | 162 } |
OLD | NEW |