Lines Matching full:secondary
172 Error("Cannot read secondary GPT header\n");
197 Error("Cannot read secondary partition entry array\n");
201 Warning("Secondary GPT header is invalid\n");
222 Error("Cannot write secondary header: %s\n", strerror(errno));
242 Error("Cannot write secondary entries: %s\n", strerror(errno));
705 GptEntry *GetEntry(GptData *gpt, int secondary, uint32_t entry_index) {
712 if (secondary == PRIMARY) {
714 } else if (secondary == SECONDARY) {
717 require(secondary == ANY_VALID);
729 void SetPriority(struct drive *drive, int secondary, uint32_t entry_index,
733 entry = GetEntry(&drive->gpt, secondary, entry_index);
737 int GetPriority(struct drive *drive, int secondary, uint32_t entry_index) {
739 entry = GetEntry(&drive->gpt, secondary, entry_index);
743 void SetTries(struct drive *drive, int secondary, uint32_t entry_index,
747 entry = GetEntry(&drive->gpt, secondary, entry_index);
751 int GetTries(struct drive *drive, int secondary, uint32_t entry_index) {
753 entry = GetEntry(&drive->gpt, secondary, entry_index);
757 void SetSuccessful(struct drive *drive, int secondary, uint32_t entry_index,
761 entry = GetEntry(&drive->gpt, secondary, entry_index);
765 int GetSuccessful(struct drive *drive, int secondary, uint32_t entry_index) {
767 entry = GetEntry(&drive->gpt, secondary, entry_index);
771 void SetRaw(struct drive *drive, int secondary, uint32_t entry_index,
774 entry = GetEntry(&drive->gpt, secondary, entry_index);
787 int IsUnused(struct drive *drive, int secondary, uint32_t index) {
789 entry = GetEntry(&drive->gpt, secondary, index);
793 int IsKernel(struct drive *drive, int secondary, uint32_t index) {
795 entry = GetEntry(&drive->gpt, secondary, index);
849 * itself so that my_lba in primary and secondary is definitely different.
858 * If any of above field are not matched, overwrite secondary with primary since
871 /* Primary entries and secondary entries should be bitwise identical.
873 * overwrites secondary with primary (primary always has higher priority),
874 * and marks secondary as modified.
882 * the secondary GPT with the primary one as that might wipe the
884 * secondary one as that will stop Windows from booting. */
915 /* The above five fields are shared between primary and secondary headers.
925 /* This function repairs primary and secondary headers if possible.
930 * we will use the primary header to overwrite secondary header.
931 * If primary is invalid (CRC32 is wrong), then we repair it from secondary.
932 * If secondary is invalid (CRC32 is wrong), then we repair it from primary.