summaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2016-10-25 10:00:27 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-11-14 16:42:19 -0800
commitf182401b974b85bc4bc641d8ec43719a99777b1b (patch)
treefa861263146816c1bc8ae8812a20e57373d27650 /utility
parentdfcacc87bec544ab7b4ed8645f65876b471a1cd3 (diff)
downloadvboot-f182401b974b85bc4bc641d8ec43719a99777b1b.tar.gz
vboot: Split partition and vblock verification from LoadKernel()stabilize-8992.B
LoadKernel() was a big function which did everything from looping over partitions on a drive to loading the data within them to calling the low-level verification functions on that data. Split it apart into more manageable chunks. This also reduces indentation of the inner parts of the code, whic increases readability. No outwardly-visible functionality changes. BUG=chromium:611535 BRANCH=none TEST=make runtests; emerge-kevin coreboot depthcharge Change-Id: Iea79e70163f5d9f1a9d0d897e4a9bacc925a742d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/404919 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'utility')
-rw-r--r--utility/load_kernel_test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/utility/load_kernel_test.c b/utility/load_kernel_test.c
index bf2c068b..71bead8e 100644
--- a/utility/load_kernel_test.c
+++ b/utility/load_kernel_test.c
@@ -180,10 +180,10 @@ int main(int argc, char* argv[]) {
}
/* Initialize the shared data area */
- lkp.shared_data_blob = malloc(VB_SHARED_DATA_REC_SIZE);
- lkp.shared_data_size = VB_SHARED_DATA_REC_SIZE;
- shared = (VbSharedDataHeader*)lkp.shared_data_blob;
- if (0 != VbSharedDataInit(shared, lkp.shared_data_size)) {
+ cparams.shared_data_blob = malloc(VB_SHARED_DATA_REC_SIZE);
+ cparams.shared_data_size = VB_SHARED_DATA_REC_SIZE;
+ shared = (VbSharedDataHeader*)cparams.shared_data_blob;
+ if (0 != VbSharedDataInit(shared, cparams.shared_data_size)) {
fprintf(stderr, "Unable to init shared data\n");
return 1;
}
@@ -226,9 +226,9 @@ int main(int argc, char* argv[]) {
printf("LoadKernel() returned %d\n", rv);
if (VBERROR_SUCCESS == rv) {
- printf("Partition number: %" PRIu64 "\n", lkp.partition_number);
+ printf("Partition number: %u\n", lkp.partition_number);
printf("Bootloader address: %" PRIu64 "\n", lkp.bootloader_address);
- printf("Bootloader size: %" PRIu64 "\n", lkp.bootloader_size);
+ printf("Bootloader size: %u\n", lkp.bootloader_size);
printf("Partition guid: "
"%02x%02x%02x%02x-%02x%02x-%02x%02x"
"-%02x%02x-%02x%02x%02x%02x%02x%02x\n",