| 1 | /* Copyright 2013 The ChromiumOS Authors |
| 2 | * Use of this source code is governed by a BSD-style license that can be |
| 3 | * found in the LICENSE file. |
| 4 | */ |
| 5 | |
| 6 | #ifndef VBOOT_REFERENCE_CGPTLIB_H_ |
| 7 | #define VBOOT_REFERENCE_CGPTLIB_H_ |
| 8 | |
| 9 | #include "2sysincludes.h" |
| 10 | #include "gpt_misc.h" |
| 11 | |
| 12 | /** |
| 13 | * Provides the location of the next kernel partition, in order of decreasing |
| 14 | * priority. |
| 15 | * |
| 16 | * On return the start_sector parameter contains the LBA sector for the start |
| 17 | * of the kernel partition, and the size parameter contains the size of the |
| 18 | * kernel partition in LBA sectors. gpt.current_kernel contains the partition |
| 19 | * index of the current chromeos kernel partition. |
| 20 | * |
| 21 | * Returns GPT_SUCCESS if successful, else |
| 22 | * GPT_ERROR_NO_VALID_KERNEL, no avaliable kernel, enters recovery mode */ |
| 23 | int GptNextKernelEntry(GptData *gpt, uint64_t *start_sector, uint64_t *size); |
| 24 | |
| 25 | #endif /* VBOOT_REFERENCE_CGPTLIB_H_ */ |