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 * 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 |
11 #include <inttypes.h> /* For PRIu64 */ | |
12 #include "boot_device.h" | 11 #include "boot_device.h" |
13 #include "cgptlib.h" | 12 #include "cgptlib.h" |
14 #include "load_kernel_fw.h" | 13 #include "load_kernel_fw.h" |
15 #include "rollback_index.h" | 14 #include "rollback_index.h" |
16 #include "utility.h" | 15 #include "utility.h" |
17 #include "vboot_common.h" | 16 #include "vboot_common.h" |
18 | 17 |
19 | 18 |
20 #define KBUF_SIZE 65536 /* Bytes to read at start of kernel partition */ | 19 #define KBUF_SIZE 65536 /* Bytes to read at start of kernel partition */ |
21 | 20 |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 /* Success! */ | 370 /* Success! */ |
372 return LOAD_KERNEL_SUCCESS; | 371 return LOAD_KERNEL_SUCCESS; |
373 } | 372 } |
374 | 373 |
375 // Handle error cases | 374 // Handle error cases |
376 if (found_partitions) | 375 if (found_partitions) |
377 return LOAD_KERNEL_INVALID; | 376 return LOAD_KERNEL_INVALID; |
378 else | 377 else |
379 return LOAD_KERNEL_NOT_FOUND; | 378 return LOAD_KERNEL_NOT_FOUND; |
380 } | 379 } |
OLD | NEW |