Lines Matching refs:secondary_header
169 if (CGPT_OK != Load(drive, &drive->gpt.secondary_header, in GptLoad()
189 GptHeader* secondary_header = (GptHeader*)drive->gpt.secondary_header; in GptLoad() local
190 if (CheckHeader(secondary_header, 1, drive->gpt.streaming_drive_sectors, in GptLoad()
194 secondary_header->entries_lba, in GptLoad()
196 CalculateEntriesSectors(secondary_header))) { in GptLoad()
218 if(CGPT_OK != Save(drive, drive->gpt.secondary_header, in GptSave()
235 GptHeader* secondary_header = (GptHeader*)drive->gpt.secondary_header; in GptSave() local
238 secondary_header->entries_lba, in GptSave()
240 CalculateEntriesSectors(secondary_header))) { in GptSave()
252 if (drive->gpt.secondary_header) in GptSave()
253 free(drive->gpt.secondary_header); in GptSave()
254 drive->gpt.secondary_header = 0; in GptSave()
692 return (GptHeader*)gpt->secondary_header; in GetGptHeader()
818 GptHeader *primary_header, *secondary_header; in UpdateCrc() local
821 secondary_header = (GptHeader*)gpt->secondary_header; in UpdateCrc()
832 size_t entries_size = secondary_header->size_of_entry * in UpdateCrc()
833 secondary_header->number_of_entries; in UpdateCrc()
834 secondary_header->entries_crc32 = in UpdateCrc()
843 secondary_header->header_crc32 = 0; in UpdateCrc()
844 secondary_header->header_crc32 = Crc32( in UpdateCrc()
845 (const uint8_t *)secondary_header, sizeof(GptHeader)); in UpdateCrc()
892 h = (GptHeader*)gpt->secondary_header; in RepairEntries()
938 GptHeader *primary_header, *secondary_header; in RepairHeader() local
941 secondary_header = (GptHeader*)gpt->secondary_header; in RepairHeader()
944 if (!IsSynonymous(primary_header, secondary_header)) { in RepairHeader()
945 CopySynonymousParts(secondary_header, primary_header); in RepairHeader()
949 memcpy(secondary_header, primary_header, sizeof(GptHeader)); in RepairHeader()
950 secondary_header->my_lba = gpt->gpt_drive_sectors - 1; /* the last sector */ in RepairHeader()
951 secondary_header->alternate_lba = primary_header->my_lba; in RepairHeader()
952 secondary_header->entries_lba = secondary_header->my_lba - in RepairHeader()
956 memcpy(primary_header, secondary_header, sizeof(GptHeader)); in RepairHeader()
958 primary_header->alternate_lba = secondary_header->my_lba; in RepairHeader()