Home | History | Annotate | Download | only in cgpt

Lines Matching refs:gpt

26   // We cannot assume the GPT headers or entry arrays have been allocated
28 AllocAndClear(&drive->gpt.primary_header,
29 drive->gpt.sector_bytes * GPT_HEADER_SECTORS);
30 AllocAndClear(&drive->gpt.secondary_header,
31 drive->gpt.sector_bytes * GPT_HEADER_SECTORS);
33 drive->gpt.modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1 |
38 GptHeader *h = (GptHeader *)drive->gpt.primary_header;
43 h->alternate_lba = drive->gpt.gpt_drive_sectors - GPT_HEADER_SECTORS;
52 if (drive->gpt.flags & GPT_FLAG_EXTERNAL) {
53 // We might have smaller space for the GPT table. Scale accordingly.
60 // GPT Header + Entries Table, though the secondary structures do not
63 (GPT_PMBR_SECTORS + GPT_HEADER_SECTORS) * drive->gpt.sector_bytes;
67 (drive->gpt.gpt_drive_sectors / 2) * drive->gpt.sector_bytes;
69 Error("Not enough space to store GPT structures. Required %d bytes.\n",
82 if (!(drive->gpt.flags & GPT_FLAG_EXTERNAL)) {
85 h->last_usable_lba = (drive->gpt.streaming_drive_sectors - GPT_HEADER_SECTORS -
89 h->last_usable_lba = (drive->gpt.streaming_drive_sectors - 1);
93 AllocAndClear(&drive->gpt.primary_entries, entries_size);
94 AllocAndClear(&drive->gpt.secondary_entries, entries_size);
97 RepairHeader(&drive->gpt, MASK_PRIMARY);
99 UpdateCrc(&drive->gpt);