Lines Matching refs:pgpt
398 * @pgpt is the primary GPT header
401 * Description: Returns nothing. Sanity checks pgpt and agpt fields
406 compare_gpts(gpt_header *pgpt, gpt_header *agpt, u64 lastlba)
409 if (!pgpt || !agpt)
411 if (le64_to_cpu(pgpt->my_lba) != le64_to_cpu(agpt->alternate_lba)) {
415 (unsigned long long)le64_to_cpu(pgpt->my_lba),
419 if (le64_to_cpu(pgpt->alternate_lba) != le64_to_cpu(agpt->my_lba)) {
423 (unsigned long long)le64_to_cpu(pgpt->alternate_lba),
427 if (le64_to_cpu(pgpt->first_usable_lba) !=
431 (unsigned long long)le64_to_cpu(pgpt->first_usable_lba),
435 if (le64_to_cpu(pgpt->last_usable_lba) !=
439 (unsigned long long)le64_to_cpu(pgpt->last_usable_lba),
443 if (efi_guidcmp(pgpt->disk_guid, agpt->disk_guid)) {
447 if (le32_to_cpu(pgpt->num_partition_entries) !=
451 le32_to_cpu(pgpt->num_partition_entries),
455 if (le32_to_cpu(pgpt->sizeof_partition_entry) !=
460 le32_to_cpu(pgpt->sizeof_partition_entry),
464 if (le32_to_cpu(pgpt->partition_entry_array_crc32) !=
469 le32_to_cpu(pgpt->partition_entry_array_crc32),
473 if (le64_to_cpu(pgpt->alternate_lba) != lastlba) {
477 (unsigned long long)le64_to_cpu(pgpt->alternate_lba),
516 gpt_header *pgpt = NULL, *agpt = NULL;
538 &pgpt, &pptes);
541 le64_to_cpu(pgpt->alternate_lba),
551 compare_gpts(pgpt, agpt, lastlba);
555 *gpt = pgpt;
569 kfree(pgpt);
577 kfree(pgpt);