Lines Matching refs:gpt
15 int GptInit(GptData *gpt) in GptInit() argument
19 gpt->modified = 0; in GptInit()
20 gpt->current_kernel = CGPT_KERNEL_ENTRY_NOT_FOUND; in GptInit()
21 gpt->current_priority = 999; in GptInit()
23 retval = GptSanityCheck(gpt); in GptInit()
29 GptRepair(gpt); in GptInit()
33 int GptNextKernelEntry(GptData *gpt, uint64_t *start_sector, uint64_t *size) in GptNextKernelEntry() argument
35 GptHeader *header = (GptHeader *)gpt->primary_header; in GptNextKernelEntry()
36 GptEntry *entries = (GptEntry *)gpt->primary_entries; in GptNextKernelEntry()
47 if (gpt->current_kernel != CGPT_KERNEL_ENTRY_NOT_FOUND) { in GptNextKernelEntry()
48 for (i = gpt->current_kernel + 1; in GptNextKernelEntry()
60 if (GetEntryPriority(e) == gpt->current_priority) { in GptNextKernelEntry()
61 gpt->current_kernel = i; in GptNextKernelEntry()
85 if (current_prio >= gpt->current_priority) { in GptNextKernelEntry()
100 gpt->current_kernel = new_kernel; in GptNextKernelEntry()
101 gpt->current_priority = new_prio; in GptNextKernelEntry()
120 int GptUpdateKernelWithEntry(GptData *gpt, GptEntry *e, uint32_t update_type) in GptUpdateKernelWithEntry() argument
187 GptModified(gpt); in GptUpdateKernelWithEntry()
198 int GptUpdateKernelEntry(GptData *gpt, uint32_t update_type) in GptUpdateKernelEntry() argument
200 GptEntry *entries = (GptEntry *)gpt->primary_entries; in GptUpdateKernelEntry()
201 GptEntry *e = entries + gpt->current_kernel; in GptUpdateKernelEntry()
203 if (gpt->current_kernel == CGPT_KERNEL_ENTRY_NOT_FOUND) in GptUpdateKernelEntry()
206 return GptUpdateKernelWithEntry(gpt, e, update_type); in GptUpdateKernelEntry()
215 GptEntry *GptFindNthEntry(GptData *gpt, const Guid *guid, unsigned int n) in GptFindNthEntry() argument
217 GptHeader *header = (GptHeader *)gpt->primary_header; in GptFindNthEntry()
218 GptEntry *entries = (GptEntry *)gpt->primary_entries; in GptFindNthEntry()