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

Side by Side Diff: firmware/lib/vboot_kernel.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 | « firmware/lib/rollback_index.c ('k') | firmware/stub/boot_device_stub.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 * Functions for loading a kernel from disk. 5 * Functions for loading a kernel from disk.
6 * (Firmware portion) 6 * (Firmware portion)
7 */ 7 */
8 8
9 #include "vboot_kernel.h" 9 #include "vboot_kernel.h"
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 gptdata->secondary_header)) 101 gptdata->secondary_header))
102 return 1; 102 return 1;
103 } 103 }
104 Free(gptdata->secondary_header); 104 Free(gptdata->secondary_header);
105 } 105 }
106 106
107 /* Success */ 107 /* Success */
108 return 0; 108 return 0;
109 } 109 }
110 110
111 /* disable MSVC warning on const logical expression (as in } while(0);) */
112 __pragma(warning(disable: 4127))
111 113
112 int LoadKernel(LoadKernelParams* params) { 114 int LoadKernel(LoadKernelParams* params) {
113 115
114 VbPublicKey* kernel_subkey = (VbPublicKey*)params->header_sign_key_blob; 116 VbPublicKey* kernel_subkey = (VbPublicKey*)params->header_sign_key_blob;
115 117
116 GptData gpt; 118 GptData gpt;
117 uint64_t part_start, part_size; 119 uint64_t part_start, part_size;
118 uint64_t blba = params->bytes_per_lba; 120 uint64_t blba = params->bytes_per_lba;
119 uint64_t kbuf_sectors = KBUF_SIZE / blba; 121 uint64_t kbuf_sectors = KBUF_SIZE / blba;
120 uint8_t* kbuf = NULL; 122 uint8_t* kbuf = NULL;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 /* Success! */ 386 /* Success! */
385 return LOAD_KERNEL_SUCCESS; 387 return LOAD_KERNEL_SUCCESS;
386 } 388 }
387 389
388 // Handle error cases 390 // Handle error cases
389 if (found_partitions) 391 if (found_partitions)
390 return LOAD_KERNEL_INVALID; 392 return LOAD_KERNEL_INVALID;
391 else 393 else
392 return LOAD_KERNEL_NOT_FOUND; 394 return LOAD_KERNEL_NOT_FOUND;
393 } 395 }
OLDNEW
« no previous file with comments | « firmware/lib/rollback_index.c ('k') | firmware/stub/boot_device_stub.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698