A simple test infrastructure -- idea stolen from Gaurav.
Review URL: http://codereview.chromium.org/1761004
diff --git a/cgptlib/cgpt.c b/cgptlib/cgpt.c
index 7f18a1c..4504a61 100644
--- a/cgptlib/cgpt.c
+++ b/cgptlib/cgpt.c
@@ -9,19 +9,19 @@
static int start[] = { 34, 10034 };
int GPTInit(GPTData_t *gpt) {
- gpt->current_kernel = 1;
- return 0;
+ gpt->current_kernel = 1;
+ return 0;
}
int GPTNextKernelEntry(GPTData_t *gpt, uint64_t *start_sector, uint64_t *size) {
- gpt->current_kernel ^= 1;
- if (start_sector) *start_sector = start[gpt->current_kernel];
- if (size) *size = 10000;
- return 0;
+ gpt->current_kernel ^= 1;
+ if (start_sector) *start_sector = start[gpt->current_kernel];
+ if (size) *size = 10000;
+ return 0;
}
int GPTUpdateKernelEntry(GPTData_t *gpt, uint32_t update_type) {
- gpt->modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1) <<
- gpt->current_kernel;
- return 0;
+ gpt->modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1) <<
+ gpt->current_kernel;
+ return 0;
}