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 | 5 |
6 #include "cgpt.h" | 6 #include "cgpt.h" |
7 | 7 |
8 /* stub code */ | 8 /* stub code */ |
9 static int start[] = { 34, 10034 }; | 9 static int start[] = { 34, 10034 }; |
10 | 10 |
11 int GPTInit(GPTData_t *gpt) { | 11 int GPTInit(GPTData_t *gpt) { |
12 gpt->current_kernel = 1; | 12 gpt->current_kernel = 1; |
13 return 0; | 13 return 0; |
14 } | 14 } |
15 | 15 |
16 int GPTNextKernelEntry(GPTData_t *gpt, uint64_t *start_sector, uint64_t *size) { | 16 int GPTNextKernelEntry(GPTData_t *gpt, uint64_t *start_sector, uint64_t *size) { |
17 gpt->current_kernel ^= 1; | 17 gpt->current_kernel ^= 1; |
18 if (start_sector) *start_sector = start[gpt->current_kernel]; | 18 if (start_sector) *start_sector = start[gpt->current_kernel]; |
19 if (size) *size = 10000; | 19 if (size) *size = 10000; |
20 return 0; | 20 return 0; |
21 } | 21 } |
22 | 22 |
23 int GPTUpdateKernelEntry(GPTData_t *gpt, uint32_t update_type) { | 23 int GPTUpdateKernelEntry(GPTData_t *gpt, uint32_t update_type) { |
24 gpt->modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1) << | 24 gpt->modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1) << |
25 gpt->current_kernel; | 25 gpt->current_kernel; |
26 return 0; | 26 return 0; |
27 } | 27 } |
OLD | NEW |