Home | History | Annotate | Download | only in cgpt

Lines Matching defs:primary_header

163   if (CGPT_OK != Load(drive, &drive->gpt.primary_header,
175 GptHeader* primary_header = (GptHeader*)drive->gpt.primary_header;
176 if (CheckHeader(primary_header, 0, drive->gpt.streaming_drive_sectors,
180 primary_header->entries_lba,
182 CalculateEntriesSectors(primary_header))) {
209 if (CGPT_OK != Save(drive, drive->gpt.primary_header,
225 GptHeader* primary_header = (GptHeader*)drive->gpt.primary_header;
228 primary_header->entries_lba,
230 CalculateEntriesSectors(primary_header))) {
246 if (drive->gpt.primary_header)
247 free(drive->gpt.primary_header);
248 drive->gpt.primary_header = 0;
690 return (GptHeader*)gpt->primary_header;
818 GptHeader *primary_header, *secondary_header;
820 primary_header = (GptHeader*)gpt->primary_header;
824 memcmp(primary_header, GPT_HEADER_SIGNATURE2,
826 size_t entries_size = primary_header->size_of_entry *
827 primary_header->number_of_entries;
828 primary_header->entries_crc32 =
838 primary_header->header_crc32 = 0;
839 primary_header->header_crc32 = Crc32(
840 (const uint8_t *)primary_header, sizeof(GptHeader));
885 GptHeader* h = (GptHeader*)(gpt->primary_header);
890 h = (GptHeader*)gpt->primary_header;
938 GptHeader *primary_header, *secondary_header;
940 primary_header = (GptHeader*)gpt->primary_header;
944 if (!IsSynonymous(primary_header, secondary_header)) {
945 CopySynonymousParts(secondary_header, primary_header);
949 memcpy(secondary_header, primary_header, sizeof(GptHeader));
951 secondary_header->alternate_lba = primary_header->my_lba;
953 CalculateEntriesSectors(primary_header);
956 memcpy(primary_header, secondary_header, sizeof(GptHeader));
957 primary_header->my_lba = GPT_PMBR_SECTORS; /* the second sector on drive */
958 primary_header->alternate_lba = secondary_header->my_lba;
960 primary_header->entries_lba = primary_header->my_lba + GPT_HEADER_SECTORS;