Louis Yung-Chieh Lo | e1a25ab | 2010-04-20 10:52:41 -0700 | [diff] [blame^] | 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 |
| 3 | * found in the LICENSE file. |
| 4 | */ |
| 5 | |
| 6 | #include "cgpt.h" |
| 7 | |
| 8 | /* stub code */ |
| 9 | static int start[] = { 34, 10034 }; |
| 10 | |
| 11 | int GPTInit(GPTData_t *gpt) { |
| 12 | gpt->current_kernel = 1; |
| 13 | return 0; |
| 14 | } |
| 15 | |
| 16 | int GPTNextKernelEntry(GPTData_t *gpt, uint64_t *start_sector, uint64_t *size) { |
| 17 | gpt->current_kernel ^= 1; |
| 18 | if (start_sector) *start_sector = start[gpt->current_kernel]; |
| 19 | if (size) *size = 10000; |
| 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | int GPTUpdateKernelEntry(GPTData_t *gpt, uint32_t update_type) { |
| 24 | gpt->modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1) << |
| 25 | gpt->current_kernel; |
| 26 | return 0; |
| 27 | } |