Lines Matching defs:pgpt
474 * @pgpt: primary GPT header
478 * Description: Returns nothing. Sanity checks pgpt and agpt fields
483 compare_gpts(gpt_header *pgpt, gpt_header *agpt, u64 lastlba)
486 if (!pgpt || !agpt)
488 if (le64_to_cpu(pgpt->my_lba) != le64_to_cpu(agpt->alternate_lba)) {
491 (unsigned long long)le64_to_cpu(pgpt->my_lba),
495 if (le64_to_cpu(pgpt->alternate_lba) != le64_to_cpu(agpt->my_lba)) {
498 (unsigned long long)le64_to_cpu(pgpt->alternate_lba),
502 if (le64_to_cpu(pgpt->first_usable_lba) !=
506 (unsigned long long)le64_to_cpu(pgpt->first_usable_lba),
510 if (le64_to_cpu(pgpt->last_usable_lba) !=
514 (unsigned long long)le64_to_cpu(pgpt->last_usable_lba),
518 if (efi_guidcmp(pgpt->disk_guid, agpt->disk_guid)) {
522 if (le32_to_cpu(pgpt->num_partition_entries) !=
526 le32_to_cpu(pgpt->num_partition_entries),
530 if (le32_to_cpu(pgpt->sizeof_partition_entry) !=
534 le32_to_cpu(pgpt->sizeof_partition_entry),
538 if (le32_to_cpu(pgpt->partition_entry_array_crc32) !=
542 le32_to_cpu(pgpt->partition_entry_array_crc32),
546 if (le64_to_cpu(pgpt->alternate_lba) != lastlba) {
549 (unsigned long long)le64_to_cpu(pgpt->alternate_lba),
587 gpt_header *pgpt = NULL, *agpt = NULL;
616 &pgpt, &pptes);
619 le64_to_cpu(pgpt->alternate_lba),
628 compare_gpts(pgpt, agpt, lastlba);
632 *gpt = pgpt;
643 kfree(pgpt);
650 kfree(pgpt);