Lines Matching refs:pgpt
472 * @pgpt: primary GPT header
476 * Description: Returns nothing. Sanity checks pgpt and agpt fields
481 compare_gpts(gpt_header *pgpt, gpt_header *agpt, u64 lastlba)
484 if (!pgpt || !agpt)
486 if (le64_to_cpu(pgpt->my_lba) != le64_to_cpu(agpt->alternate_lba)) {
489 (unsigned long long)le64_to_cpu(pgpt->my_lba),
493 if (le64_to_cpu(pgpt->alternate_lba) != le64_to_cpu(agpt->my_lba)) {
496 (unsigned long long)le64_to_cpu(pgpt->alternate_lba),
500 if (le64_to_cpu(pgpt->first_usable_lba) !=
504 (unsigned long long)le64_to_cpu(pgpt->first_usable_lba),
508 if (le64_to_cpu(pgpt->last_usable_lba) !=
512 (unsigned long long)le64_to_cpu(pgpt->last_usable_lba),
516 if (efi_guidcmp(pgpt->disk_guid, agpt->disk_guid)) {
520 if (le32_to_cpu(pgpt->num_partition_entries) !=
524 le32_to_cpu(pgpt->num_partition_entries),
528 if (le32_to_cpu(pgpt->sizeof_partition_entry) !=
532 le32_to_cpu(pgpt->sizeof_partition_entry),
536 if (le32_to_cpu(pgpt->partition_entry_array_crc32) !=
540 le32_to_cpu(pgpt->partition_entry_array_crc32),
544 if (le64_to_cpu(pgpt->alternate_lba) != lastlba) {
547 (unsigned long long)le64_to_cpu(pgpt->alternate_lba),
585 gpt_header *pgpt = NULL, *agpt = NULL;
616 &pgpt, &pptes);
619 le64_to_cpu(pgpt->alternate_lba),
638 compare_gpts(pgpt, agpt, lastlba);
642 *gpt = pgpt;
653 kfree(pgpt);
660 kfree(pgpt);